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 char a[] = "string"; and
char *p = "string"; ?

Answer Posted / karuna

a[] is a constant pointer to a string;

char *p is a pointer to a constant string;

In a[] address of a[] cant be change but string can be
change.

In char *p address can be change string cant be change

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1870


What is main return c?

994


Is return a keyword in c?

1073


what is a function method?give example?

2356


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1125


What does the c in ctime mean?

1087


What are the features of the c language?

1082


List some of the dynamic data structures in C?

1238


Explain how does free() know explain how much memory to release?

1068


What is an auto keyword in c?

1096


What is action and transformation in spark?

1159


What is operator promotion?

1058


code for find determinent of amatrix

1957


Can we assign string to char pointer?

1097


What is difference between constant pointer and constant variable?

1299