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...

wats the diference btwen constant pointer and pointer to a
constant.pls give examples.

Answer Posted / rudra prasad panda

Pointer is a variable containing the addres of another
variable;
Constant pointer is a variable which points to a variable
constantly.it means that , once it is initialised,it cannot
be changed.Till the end of program,it points to that
variable only;
EXAMPLE:
char k,m;
const char *p=&k;
p=&m;//(syntax error)

********
A pointer to a constant is a pointer such that the contents
of the variable(pointed by the pointer)cannot be modified
throuhg the pointer;
EXAMPLE:
char m='l';
char * const p;
p=&m;
*p='u';//syntax error
m='k';//no syntax error

Is This Answer Correct ?    8 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why structure is used in c?

1107


How can type-insensitive macros be created?

1122


Write a program of advanced Fibonacci series.

1089


Describe the difference between = and == symbols in c programming?

1291


When is the “void” keyword used in a function?

1426


What are bitwise shift operators in c programming?

1034


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1798


What does c mean?

969


Linked lists -- can you tell me how to check whether a linked list is circular?

1030


What is anagram in c?

868


What is difference between Structure and Unions?

1182


What is I ++ in c programming?

1057


What is the use of typedef in c?

987


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

2133


Tell me can the size of an array be declared at runtime?

984