what is diffrence between string and character array?
Answer Posted / vadivelt
By default String always ends with NULL character ie., '\0'.
But in character array manually it is needed to terminate
with NULL(You can do this, only when you wanted to use
character array as string)
Eg;
char *p = "Vadivel"; /*By default string is terminated
with '\0'*/
char array[8] = {'V','a','d','i','v','e','l','\0'};
/*Here terminated manually*/
Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
What is the use of a ‘ ’ character?
What is the difference between scanf and fscanf?
What is static volatile in c?
How do you define CONSTANT in C?
Is it acceptable to declare/define a variable in a c header?
write a c program for swapping two strings using pointer
What is a structure in c language. how to initialise a structure in c?
When can you use a pointer with a function?
What are header files in c?
How do you sort filenames in a directory?
Where in memory are my variables stored?
Can we change the value of static variable in c?
Is c procedural or functional?
What is use of integral promotions in c?
Explain the use of fflush() function?