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 the difference between constant pointer and pointer
to a constant. Give examples.

Answer Posted / prashant

the example given by Santosh for "Constant Pointer" is wrong .
Use
int * const p = &localVariable;
instead of const int *p = &localVariable;.

then we cant do p++ or p--;

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best organizational structure?

1068


What is n in c?

981


Explain that why C is procedural?

1087


What is the difference between pure virtual function and virtual function?

1070


Explain the use of 'auto' keyword

1075


Explain the advantages and disadvantages of macros.

1036


What is union and structure in c?

1153


What is double pointer?

955


I have seen function declarations that look like this

997


What is an example of structure?

984


Write a program to reverse a linked list in c.

1069


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2754


How does #define work?

1014


What is meant by int main ()?

1158


Explain the priority queues?

1034