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
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
If errno contains a nonzero number, is there an error?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
what do you mean by inline function in C?
Explain setjmp()?
Is there a built-in function in C that can be used for sorting data?
Do pointers need to be initialized?
When should we use pointers in a c program?
What is the difference between fread and fwrite function?
#include
What is array within structure?
write a program to display all prime numbers
What are the advantages of external class?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What is realloc in c?