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
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
what are non standard function in c
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
I have a varargs function which accepts a float parameter?
What is c definition?
What is pointer to pointer in c language?
What are volatile variables in c?
Can an array be an Ivalue?
What is indirection? How many levels of pointers can you have?
how to build a exercise findig min number of e heap with list imlemented?
Why we write conio h in c?
How do you list a file’s date and time?
What does it mean when a pointer is used in an if statement?
What are external variables in c?
What is the process to generate random numbers in c programming language?