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 difference between local variable and global variable in c?

1223


How can I open files mentioned on the command line, and parse option flags?

1066


How will you delete a node in DLL?

1282


What is a stream?

1132


What is dynamic dispatch in c++?

1046


Write programs for String Reversal & Palindrome check

1052


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2454


What is a macro, and explain how do you use it?

1070


Explain Basic concepts of C language?

1143


What is pointer to pointer in c?

1099


What would be an example of a structure analogous to structure c?

987


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3575


Why do we use return in c?

989


How can I pad a string to a known length?

1029


What is a scope resolution operator in c?

1257