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 / jamili reddy

int i =12;
int * const ptr = 24; //constant pointer

you can't change the ptr value

const int *ptr = 24;//ptr to a constant

int const * ptr = 24;//ptr to a constant


you can't change the value at ptr

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of data structures in c?

1215


Which of these functions is safer to use : fgets(), gets()? Why?

1162


What is uint8 in c?

1162


What is calloc() function?

1161


How can I do graphics in c?

1070


Create a simple code fragment that will swap the values of two variables num1 and num2.

1326


Which is better malloc or calloc?

1157


Describe static function with its usage?

1270


Why main is used in c?

1126


Explain the term printf() and scanf() used in c language?

1094


What is the general form of function in c?

1070


What is the benefit of using const for declaring constants?

1102


What is the benefit of using #define to declare a constant?

1149


What is NULL pointer?

1144


Tell me when is a void pointer used?

1239