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
why do some people write if(0 == x) instead of if(x == 0)?
Is r written in c?
What is the use of pointers in C?
Why c is procedure oriented?
Why are all header files not declared in every c program?
What is main function in c?
write a program to print largest number of each row of a 2D array
What is static identifier?
Process by which one bit pattern in to another by bit wise operation is?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
Explain why can’t constant values be used to define an array’s initial size?
What do header files do?
Explain what is meant by 'bit masking'?
Explain how can I right-justify a string?
What should malloc() do?