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
What is the meaning of ?
What are the types of functions in c?
What is structure of c program?
How is a macro different from a function?
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
p*=(++q)++*--p when p=q=1 while(q<=6)
What is the best style for code layout in c?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
When should the register modifier be used? Does it really help?
How can you read a directory in a C program?
What is break in c?
i have a written test for microland please give me test pattern
Explain what is the stack?
Why c is called a middle level language?
What is .obj file in c?