Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / rudra prasad panda

Pointer is a variable containing the addres of another
variable;
Constant pointer is a variable which points to a variable
constantly.it means that , once it is initialised,it cannot
be changed.Till the end of program,it points to that
variable only;
EXAMPLE:
char k,m;
const char *p=&k;
p=&m;//(syntax error)

********
A pointer to a constant is a pointer such that the contents
of the variable(pointed by the pointer)cannot be modified
throuhg the pointer;
EXAMPLE:
char m='l';
char * const p;
p=&m;
*p='u';//syntax error
m='k';//no syntax error

Is This Answer Correct ?    8 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is %d called in c?

1280


What are the functions to open and close the file in c language?

1082


please send me the code for multiplying sparse matrix using c

2219


Do you know what are the properties of union in c?

1131


What is difference between array and pointer in c?

1134


What are pointers in C? Give an example where to illustrate their significance.

1272


How old is c programming language?

1061


What does double pointer mean in c?

1250


What is the difference between the = symbol and == symbol?

1166


What is the maximum no. of arguments that can be given in a command line in C.?

1199


What are the disadvantages of external storage class?

1102


Is void a keyword in c?

1045


What are the two forms of #include directive?

1218


How do you determine a file’s attributes?

1130


Explain what’s a signal? Explain what do I use signals for?

1246