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

Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3181


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1031


Why cant I open a file by its explicit path?

987


What is volatile, register definition in C

1054


Can an array be an Ivalue?

1051


Why we use conio h in c?

1150


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1168


What is d'n in c?

1067


What are the advantages of Macro over function?

1923


What is return in c programming?

915


What is the difference between printf and scanf in c?

1283


What is the maximum length of an identifier?

1128


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1880


Where define directive used?

1031


What is the function of volatile in c language?

1065