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 the functions to open and close the file in c language?
Where are some collections of useful code fragments and examples?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Which is best linux os?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
How can I manipulate individual bits?
Is c easier than java?
what do u mean by Direct access files? then can u explain about Direct Access Files?
What is dangling pointer in c?
Explain modulus operator.
write a program to find out prime number using sieve case?
Difference between Shallow copy and Deep copy?
What is the difference between declaring a variable and defining a variable?
How to Throw some light on the splay trees?