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

Pointers are fine a cannot be changed p can be changed.

I have a doubt like is there any difference in memory
allocation.

I heard like a gets its memory in local stack and p gets in
data section.

I don get the clear explanation

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of pointers?

1026


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1495


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1024


Why we not create function inside function.

2154


using for loop sum 2 number of any 4 digit number in c language

2280


Explain how can I prevent another program from modifying part of a file that I am modifying?

1046


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1044


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5908


What does %d do in c?

921


What is difference between stdio h and conio h?

1335


What is data structure in c and its types?

1038


What is typedef example?

1129


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1175


What is the scope of an external variable in c?

1000


Why c is called a mid level programming language?

1041