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 meaning of ?

990


What are the types of functions in c?

934


What is structure of c program?

1078


How is a macro different from a function?

1118


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2614


p*=(++q)++*--p when p=q=1 while(q<=6)

1698


What is the best style for code layout in c?

1048


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1882


When should the register modifier be used? Does it really help?

920


How can you read a directory in a C program?

1095


What is break in c?

985


i have a written test for microland please give me test pattern

2666


Explain what is the stack?

1041


Why c is called a middle level language?

1052


What is .obj file in c?

1023