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 / ashish

here a is an array and is a char const * data type.
hence u cannot change value of a but u can change the value
which a points to.
p on the other hand is a const char * data type.
hence value of p an be changed but the value p points to
cannot be changed.




i dont know the answer!!! :P

Is This Answer Correct ?    3 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of volatile in c language?

1114


What are actual arguments?

1083


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1069


Explain what is #line used for?

1056


What is array in C

1150


Why is it usually a bad idea to use gets()? Suggest a workaround.

1775


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2319


Explain the array representation of a binary tree in C.

1224


How are structure passing and returning implemented?

1028


What is the advantage of a random access file?

1194


Which type of language is c?

1069


what is ur strangth & weekness

2413


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2363


Can a pointer point to null?

1060


What is static identifier?

1216