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
const char *p, char const *p, const char* const p

Answer Posted / kumar krishna

CONST char *p;
here the const. keyword is coming before the "*p"
So it affects the value pointed by "p" i.e. "*p"
You can't change the character (value pointed by p).
Although you can change the address stored in "p".

char CONST *p;
same explanation as above

char * CONST p;
here the const. keyword is coming before the "p" and
after "*" So it affects the value of "p" (which holds
the address). You can't change the address stored in
"p". Although you can change the value pointed by p
i.e. "*p"

CONST char* CONST p:
here CONST is coming before the "*" as well as after
the "*". Therefore, as expeected neither the address
of nor the value pointed by "p" can be changed.

Is This Answer Correct ?    170 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1130


What is c language in simple words?

1068


What is the general form of #line preprocessor?

993


How many main () function we can have in a project?

1111


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

1049


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1283


What is typedef example?

1185


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1251


code for replace tabs with equivalent number of blanks

2162


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2021


hi, which software companys will take,if d candidate's % is jst 55%?

2091


Explain what does it mean when a pointer is used in an if statement?

1064


Explain how can you restore a redirected standard stream?

1098


What do you know about the use of bit field?

1046


How can you increase the allowable number of simultaneously open files?

1158