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

How can you pass an array to a function by value?

1175


What is the size of enum in bytes?

1132


Do variables need to be initialized?

1106


What is the c language function prototype?

1138


What is define c?

1154


Is a pointer a kind of array?

1243


What are the advantages and disadvantages of pointers?

1119


Explain what is dynamic data structure?

1216


How to declare a variable?

1068


Explain setjmp()?

1112


What is function prototype in c language?

1083


How can I pad a string to a known length?

1082


Explain what is the difference between a string and an array?

1221


What are the types of pointers in c?

1078


Explain why C language is procedural?

1269