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...

What is a const pointer, and how does it differ from a pointer to a const?

Answer Posted / nashiinformaticssolutions

1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should a far pointer be used?

1186


What is the full form of getch?

1355


what is the structure pointer?

2178


write a program for the normal snake games find in most of the mobiles.

2307


Why do we use return in c?

1048


What is the function of volatile in c language?

1184


What is register variable in c language?

1062


What is the difference between void main and main in c?

1207


Can the size of an array be declared at runtime?

1143


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1328


What does node * mean?

1303


What is 'bus error'?

1208


How can I get random integers in a certain range?

1125


How do I determine whether a character is numeric, alphabetic, and so on?

1182


Explain a pre-processor and its advantages.

1190