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 const volatile variable in c?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What are different types of pointers?
What are data structures in c and how to use them?
What are pointers in C? Give an example where to illustrate their significance.
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What happens if header file is included twice?
Whats s or c mean?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
Does c have class?
Why is sprintf unsafe?
What is the advantage of an array over individual variables?
Explain the meaning of keyword 'extern' in a function declaration.
What is wrong with this code?
Here is a neat trick for checking whether two strings are equal