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

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

What is a struct c#?

1097


What is sizeof return in c?

1086


Why cant I open a file by its explicit path?

1081


What's a good way to check for "close enough" floating-point equality?

1252


What are Macros? What are its advantages and disadvantages?

1216


Explain the difference between structs and unions in c?

1064


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15887


Why flag is used in c?

1179


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1130


Explain what are the advantages and disadvantages of a heap?

1124


How to delete a node from linked list w/o using collectons?

2821


Can we use visual studio for c?

1151


Explain a pre-processor and its advantages.

1189


Explain what standard functions are available to manipulate strings?

1125


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1780