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?

Answers were Sorted based on User's Feedback



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

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

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

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

More C Interview Questions

Why we use break in c?

0 Answers  


Taking an example,differentiate b/w loader and linker ?

1 Answers  


Why should I prototype a function?

0 Answers  


Why structure is used in c?

0 Answers  


Is c procedural or object oriented?

0 Answers  


Which is better between malloc and calloc?

0 Answers  


what is the difference between declaration and definition of a variable or function ?

3 Answers  


How to add two numbers without using semicolon n c????

3 Answers  


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

0 Answers   TCS,


errors in computer programmes are called

1 Answers   NET,


what are two kinds of java

2 Answers  


What is the use of c language in real life?

0 Answers  


Categories