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

Answer Posted / praveenkumar managuli

char s[]; this allocate memory equal tosize of string
and char *s; holds the address of first charecter

Is This Answer Correct ?    23 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the error message "DGROUP exceeds 64K" mean?

972


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

846


What are header files and explain what are its uses in c programming?

822


What is the difference between typedef and #define?

720


State the difference between x3 and x[3].

824


What is include directive in c?

828


What are the advantages of union?

817


What does void main () mean?

947


What is extern c used for?

746


Can main () be called recursively?

858


What is the auto keyword good for?

804


Can I initialize unions?

798


What is define directive?

847


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

834


application attempts to perform an operation?

1712