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
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Is that possible to store 32768 in an int data type variable?
What do the functions atoi(), itoa() and gcvt() do?
How to establish connection with oracle database software from c language?
What is a nested formula?
How can I change the size of the dynamically allocated array?
What is the purpose of 'register' keyword in c language?
Why pointers are used?
How do you sort filenames in a directory?
What is static volatile in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What is string in c language?
What are the rules for the identifier?
What are structures and unions? State differencves between them.
What is the meaning of typedef struct in c?