What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / srinivas
a is a const pointer, whereas p is not
meaning 'a' will point to a fixed location (value of 'a' or
address of *a can't change, remains fixed) - though
contents of a can be changed (by way of accessing a[i])
Is This Answer Correct ? | 36 Yes | 6 No |
Post New Answer View All Answers
What are qualifiers in c?
Why c is called top down?
Is the exit() function same as the return statement? Explain.
What is the use of header files?
Does free set pointer to null?
What is #include called?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
What is difference between structure and union?
What is meant by int main ()?
What is use of integral promotions in c?
What are valid signatures for the Main function?
Explain b+ tree?
Explain the properties of union.
Here is a neat trick for checking whether two strings are equal
What does the c preprocessor do?