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 / rani

Constant pointer cannot be reassigned to different objects
once its initialized. It can be used to modify the object
that it points to.

Eg.
int *const constPtr;

*constPtr =0; //can be modified like this

Pointer to constant can be reassigned to point to another
object of same type.

int const *ptrConst;

ptrConst = 0;

Is This Answer Correct ?    37 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is sprintf unsafe?

1073


How can I do graphics in c?

1030


Discuss the function of conditional operator, size of operator and comma operator with examples.

1158


What is the symbol indicated the c-preprocessor?

1240


What is an auto keyword in c?

1096


Can we use visual studio for c?

1084


What is the basic structure of c?

1078


Can you add pointers together? Why would you?

1124


What is memory leak in c?

1127


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

1164


What is the default value of local and global variables in c?

1038


Explain what are the __date__ and __time__ preprocessor commands?

1116


Write a c program to demonstrate character and string constants?

2191


What is the difference between Printf(..) and sprint(...) ?

1527


What are the difference between a free-standing and a hosted environment?

1286