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 / ashwin kumar

just one word i can say that
a[] is static memory allocation ( we cant increase size of
array while execution of program )
*p is a dynamic memory allocation ( where we can use
according to our requirement while execution )

their may be a waste age of memory and also their may be
limitaion of elements in array.

memory will not be wasted and size depends up on our
require ment in pointes

i hope its may be one of the defferance

if thier is any feed back or my answer is wrong plz write
to molugu.aswin@gmail.com

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can 'this' pointer by used in the constructor?

1096


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1145


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1113


Explain is it better to bitshift a value than to multiply by 2?

1204


Why is it important to memset a variable, immediately after allocating memory to it ?

2077


What do you mean by keywords in c?

1153


What extern c means?

1005


What is the general form of #line preprocessor?

997


What is the most efficient way to count the number of bits which are set in an integer?

1061


How can I read a binary data file properly?

1176


How can I swap two values without using a temporary?

1110


Explain the use of bit fieild.

1139


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2412


What does %p mean?

1087


Why structure is used in c?

1191