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
Explain the concept and use of type void.
How are structure passing and returning implemented?
Explain low-order bytes.
What is time complexity c?
How can I insert or delete a line (or record) in the middle of a file?
Can you define which header file to include at compile time?
What is the purpose of main() function?
How can a program be made to print the line number where an error occurs?
What are variables c?
How can I send mail from within a c program?
What is the difference between variable declaration and variable definition in c?
largest Of three Number using without if condition?
What does dm mean sexually?
What is pointer and structure in c?
What is union and structure in c?