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 data type long in c?
Explain how can you avoid including a header more than once?
What is 1f in c?
What is the advantage of a random access file?
Can you add pointers together? Why would you?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
What is logical error?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
When should I declare a function?
Explain what is a static function?
develop algorithms to add polynomials (i) in one variable
What is bubble sort technique in c?
Differentiate between a for loop and a while loop? What are it uses?
What are two dimensional arrays alternatively called as?
What are the advantages of c language?