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

What are 3 types of structures?

1071


What is difference between structure and union with example?

1059


List some of the static data structures in C?

1202


How do you do dynamic memory allocation in C applications?

1089


Write a program to swap two numbers without using a temporary variable?

1128


What is pointer & why it is used?

1122


What is the advantage of an array over individual variables?

1241


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

2260


Without Computer networks, Computers will be half the use. Comment.

2302


What are reserved words?

1113


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1249


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1727


What is the difference between mpi and openmp?

1301


Why main is used in c?

1078


What is the correct declaration of main?

1214