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 is the scope of global variable in c?
Explain what does the function toupper() do?
What are the rules for the identifier?
What is #line?
What is the right type to use for boolean values in c? Is there a standard type?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
How can I find the modification date of a file?
Write a program to swap two numbers without using third variable?
How are structure passing and returning implemented?
Why does not c have an exponentiation operator?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
Difference between exit() and _exit() function?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
i have a written test for microland please give me test pattern
How can I read/write structures from/to data files?