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
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Can you write a programmer for FACTORIAL using recursion?
Was 2000 a leap year?
Can the sizeof operator be used to tell the size of an array passed to a function?
How can you convert integers to binary or hexadecimal?
What does the error 'Null Pointer Assignment' mean and what causes this error?
How do we print only part of a string in c?
Explain the difference between strcpy() and memcpy() function?
Why is c used in embedded systems?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Is c procedural or functional?
Tell me what is the purpose of 'register' keyword in c language?
What is null in c?
Why is c fast?
When we use void main and int main?