What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / ashish
here a is an array and is a char const * data type.
hence u cannot change value of a but u can change the value
which a points to.
p on the other hand is a const char * data type.
hence value of p an be changed but the value p points to
cannot be changed.
i dont know the answer!!! :P
| Is This Answer Correct ? | 3 Yes | 13 No |
Post New Answer View All Answers
What is a macro?
What is an array in c?
what is the diffrenet bettwen HTTP and internet protocol
What is the use of bitwise operator?
How do I get an accurate error status return from system on ms-dos?
#include
What is modeling?
Which is more efficient, a switch statement or an if else chain?
What is #line in c?
What is unary operator?
Can you write the function prototype, definition and mention the other requirements.
What is the heap?
How would you rename a function in C?
Are the variables argc and argv are always local to main?
Write a program for Overriding.