What is the difference between char a[] = "string"; and
char *p = "string"; ?

Answer Posted / parmjeet kumar

char a[] will alocate the momery size of " string" word in
other hand char *p will alocate the memory size of one
character... or we can not move the data from one location
to another location but with pointer we can do it...

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c have class?

604


Why do we need volatile in c?

737


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

760


Why main is used in c?

579


What is the difference between call by value and call by reference in c?

610






Why isnt any of this standardized in c?

629


What does %p mean c?

617


Is null always defined as 0(zero)?

602


Why malloc is faster than calloc?

580


Where static variables are stored in c?

581


What are two dimensional arrays alternatively called as?

649


State the difference between x3 and x[3].

642


What header files do I need in order to define the standard library functions I use?

530


Which is best linux os?

552


How can I find out the size of a file, prior to reading it in?

610