What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / ashok
Pointers are fine a cannot be changed p can be changed.
I have a doubt like is there any difference in memory
allocation.
I heard like a gets its memory in local stack and p gets in
data section.
I don get the clear explanation
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What are different types of pointers?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Why we not create function inside function.
using for loop sum 2 number of any 4 digit number in c language
Explain how can I prevent another program from modifying part of a file that I am modifying?
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.
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What does %d do in c?
What is difference between stdio h and conio h?
What is data structure in c and its types?
What is typedef example?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is the scope of an external variable in c?
Why c is called a mid level programming language?