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
which type of aspect you want from the student.
Write a function that will take in a phone number and output all possible alphabetical combinations
What is calloc() function?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
How can I find out if there are characters available for reading?
What is the default value of local and global variables in c?
What is the difference between declaring a variable and defining a variable?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
Write a program to identify if a given binary tree is balanced or not.
What is meant by int main ()?
Describe the header file and its usage in c programming?
difference between native and cross compilers
What is dynamic memory allocation?
How many data structures are there in c?
what is the format specifier for printing a pointer value?