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 difference between scanf and fscanf?
What are the main characteristics of c language describe the structure of ac program?
What does typedef struct mean?
please give me some tips for the placement in the TCS.
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.?
hi any body pls give me company name interview conduct "c" language only
Differentiate between static and dynamic modeling.
Is fortran still used today?
int far *near * p; means
If errno contains a nonzero number, is there an error?
Explain what does it mean when a pointer is used in an if statement?
What are the usage of pointer in c?
What is array within structure?
Explain main function in c?
What are inbuilt functions in c?