What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / karuna
a[] is a constant pointer to a string;
char *p is a pointer to a constant string;
In a[] address of a[] cant be change but string can be
change.
In char *p address can be change string cant be change
| Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is main return c?
Is return a keyword in c?
what is a function method?give example?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What does the c in ctime mean?
What are the features of the c language?
List some of the dynamic data structures in C?
Explain how does free() know explain how much memory to release?
What is an auto keyword in c?
What is action and transformation in spark?
What is operator promotion?
code for find determinent of amatrix
Can we assign string to char pointer?
What is difference between constant pointer and constant variable?