What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / mak
in case of array size of it become fixed after initialization,
so a string of length greater than the size of previous string can't be assigned to array.
on the other hand pointer can take variable size string as it stores only the first address.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is a wrapper function in c?
What are the advantages of c language?
Difference between strcpy() and memcpy() function?
How variables are declared in c?
What is the significance of scope resolution operator?
write a c program in such a way that if we enter the today date the output should be next day's date.
What is the purpose of realloc()?
What is an endless loop?
What is merge sort in c?
can we change the default calling convention in c if yes than how.........?
Explain how can I prevent another program from modifying part of a file that I am modifying?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What is the difference between fread and fwrite function?
Why static variable is used in c?
What are header files and explain what are its uses in c programming?