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
Explain what does it mean when a pointer is used in an if statement?
In c language can we compile a program without main() function?
Explain what math functions are available for integers? For floating point?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What are the types of bitwise operator?
What does double pointer mean in c?
What is the function of multilevel pointer in c?
What is #define in c?
Write a program to check whether a number is prime or not using c?
What is difference between constant pointer and constant variable?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What do you mean by c what are the main characteristics of c language?
How can I open a file so that other programs can update it at the same time?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Can math operations be performed on a void pointer?