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 the function of volatile in c language?
What are actual arguments?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Explain what is #line used for?
What is array in C
Why is it usually a bad idea to use gets()? Suggest a workaround.
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
Explain the array representation of a binary tree in C.
How are structure passing and returning implemented?
What is the advantage of a random access file?
Which type of language is c?
what is ur strangth & weekness
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
Can a pointer point to null?
What is static identifier?