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 these initializations?
Char a[]=”string”;
Char *p=”literal”;
Does *p++ increment p, or what it points to?

Answer Posted / vignesh1988i

surely there is some difference.....

here 'a' is represented as array in which string gets stored
in consecutive locations......

p is a pointer variable where string is initilized... so in
p the base address of "literal " will get stored......

*p++ increments 'p' , but pertaining to some conditions.....
++ has more precedence than * , so first it will increment
the address and correspondingly it will show the value as *
precedes..... so after the increment the p points to 'i'...



thank u

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between scanf and fscanf?

1209


What are the main characteristics of c language describe the structure of ac program?

1163


What does typedef struct mean?

1055


please give me some tips for the placement in the TCS.

2066


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1036


hi any body pls give me company name interview conduct "c" language only

2254


Differentiate between static and dynamic modeling.

1062


Is fortran still used today?

1055


int far *near * p; means

3512


If errno contains a nonzero number, is there an error?

1314


Explain what does it mean when a pointer is used in an if statement?

1017


What are the usage of pointer in c?

1143


What is array within structure?

1078


Explain main function in c?

1052


What are inbuilt functions in c?

991