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 are the 4 types of unions?

983


Explain why C language is procedural?

1160


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

988


When is a null pointer used?

1059


What is the difference between array and pointer in c?

1084


Are c and c++ the same?

1001


How can I access an I o board directly?

1034


What is the function of this pointer?

1216


What does a pointer variable always consist of?

1036


What is the difference between memcpy and memmove?

968


Define the scope of static variables.

1059


What are conditional operators in C?

1044


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3501


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1027


What does %p mean c?

1016