what is difference between array of characters and string
Answer Posted / zubair
String is much same as character array, it can also be
checked by each characters:
string str;for(int i=0;str[i]!='\0';i++) cout <<str[i]<<endl;
1. The NULL terminator is loaded automatically in string.('\0')
2.Both of them drop the data after space when we take input.
Is This Answer Correct ? | 35 Yes | 4 No |
Post New Answer View All Answers
What is a spanning Tree?
What is volatile variable in c with example?
Define C in your own Language.
How many parameters should a function have?
Is exit(status) truly equivalent to returning the same status from main?
Explain what is the benefit of using an enum rather than a #define constant?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is assert and when would I use it?
What is difference between structure and union with example?
Difference between MAC vs. IP Addressing
what is a constant pointer in C
What are the features of the c language?
Explain what is the general form of a c program?
How can I swap two values without using a temporary?
What is the scope of global variable in c?