what is difference between array of characters and string
Answer Posted / kapil kumar verma iimt meerut
when we declare array of char it has to be terminated by
null but termination by null in case of string is
automatic.the compiler automatically puts a null char when
we insert a string for example "kapil" for the
string "kapil\0", but for a char array we need assign a
place for it for example a[6] contains five char & a null
char.& secondly
when char array is read through scanf() input function then
spaces are not allowed if characters is read as string
(through gets() function) spaces are allowedand are treated
as a single char.
Is This Answer Correct ? | 38 Yes | 4 No |
Post New Answer View All Answers
Write a C program in Fibonacci series.
What does %d do in c?
What is indirection in c?
What is null character in c?
why wipro wase
Write a program of prime number using recursion.
What is meant by operator precedence?
What does the c in ctime mean?
What is the role of && operator in a program code?
What is c programming structure?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Do you know the difference between exit() and _exit() function in c?
How is null defined in c?
What is this pointer in c plus plus?