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 is an auto keyword in c?
write a c program in such a way that if we enter the today date the output should be next day's date.
string reverse using recursion
What are the types of pointers?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
How to write c functions that modify head pointer of a linked list?
How are portions of a program disabled in demo versions?
Where are local variables stored in c?
Where can I get an ansi-compatible lint?
What is the general form of #line preprocessor?
What are the 5 data types?
What is the use of sizeof?
What are formal parameters?
What is the difference between array and pointer in c?
What is gets() function?