wats the diference btwen constant pointer and pointer to a
constant.pls give examples.

Answer Posted / sanjay

Pointer to a consttant ::: such that the value to which
pointer points can't be changed
const int *ptr1=7
*ptr=8 // invalid
constant pointer :::: pointer direction can't be cheged .
int *const x =6;
x=7 or x=&i // invalid
Location of pointer can't be chenged.

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between strcpy() and memcpy() function in c programming?

626


For what purpose null pointer used?

606


how could explain about job profile

1446


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1895


What are the basic data types associated with c?

811






What are two dimensional arrays alternatively called as?

653


Why c is called a middle level language?

634


What is meant by high-order and low-order bytes?

650


Who developed c language?

636


how do you execute a c program in unix.

636


Explain what is the purpose of "extern" keyword in a function declaration?

615


What is the size of enum in bytes?

581


Was 2000 a leap year?

625


What are the primitive data types in c?

570


Explain the meaning of keyword 'extern' in a function declaration.

718