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
Explain union. What are its advantages?
Where are some collections of useful code fragments and examples?
What are the similarities between c and c++?
Write a program to print "hello world" without using a semicolon?
What is the data segment that is followed by c?
What is #include stdio h?
Explain can static variables be declared in a header file?
What is the difference between typedef struct and struct?
Difference between malloc() and calloc() function?
How can I run c program?
How reliable are floating-point comparisons?
Is fortran still used in 2018?
What is the purpose of realloc()?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What is pass by reference in c?