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 we replace the struct function in tree syntax with a union?
Explain what does the function toupper() do?
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
What are the advantages of Macro over function?
hi send me sample aptitude papers of cts?
What does it mean when the linker says that _end is undefined?
What is a protocol in c?
Describe dynamic data structure in c programming language?
What is the scope of global variable in c?
What are the key features in c programming language?
What is register variable in c language?
Why & is used in c?
What are the difference between a free-standing and a hosted environment?
Write a program to find factorial of a number using recursive function.
Explain spaghetti programming?