what is difference between array of characters and string
Answer Posted / shayan
the main difference between array of char and string is that when we declare array of char like char name[6],in this case for example shayan s is stored in 0 index and last character is n which is at 5 index but i delared 6 because 6th index is of null character which is neccesary to declare but in string it will automatically declare by the compiler like "shayan" after n compiler automatically put \0 after n.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What does s c mean in text?
What is variable and explain rules to declare variable in c?
Why c is called top down?
Simplify the program segment if X = B then C ← true else C ← false
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Explain how are portions of a program disabled in demo versions?
What 'lex' does?
What is the process of writing the null pointer?
What is typedef struct in c?
What is a far pointer in c?
Explain the difference between getch() and getche() in c?
What is pointer to pointer in c?
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
What are the types of operators in c?
What is main return c?