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

What are the different types of control structures in programming?

1136


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3546


What are identifiers and keywords in c?

1106


What is getch () for?

1243


What is array of structure in c programming?

1291


What is the main difference between calloc () and malloc ()?

1159


What does %p mean?

1089


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1061


What's the best way of making my program efficient?

1110


Why c is called top down?

1167


What is an expression?

1059


How can you increase the size of a statically allocated array?

1081


What is a program flowchart and how does it help in writing a program?

1144


What language is c written?

1055


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1025