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
How many parameters should a function have?
How does selection sort work in c?
What is a pragma?
explain how do you use macro?
How can you restore a redirected standard stream?
What are the characteristics of arrays in c?
What is dynamic dispatch in c++?
develop algorithms to add polynomials (i) in one variable
write a c program for swapping two strings using pointer
Explain what are the __date__ and __time__ preprocessor commands?
How can I call a function with an argument list built up at run time?
How many levels of indirection in pointers can you have in a single declaration?
what is event driven software and what is procedural driven software?
What are the two types of functions in c?
What is pointer to pointer in c with example?