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

What are pointers in C? Give an example where to illustrate their significance.

0 Answers   Wipro,


What is #include in c?

1 Answers  


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


how to write a bubble sort program without using temporary variable?

1 Answers   Aricent,


write a program to compare 2 numbers without using logical operators?

5 Answers   IBM,


hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????

1 Answers  


do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's?

1 Answers   Oracle,


What is data structure in c language?

0 Answers  


Software Interview Questions

1 Answers   CAT,


can we print any string without using terminator?

2 Answers   Infosys, TCS,


control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent

1 Answers  


What is stack in c?

0 Answers  


Categories