MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures Mcqs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
String concatenation means |
| A. | Combining two strings. |
| B. | Extracting a substring out of a string. |
| C. | Partitioning the string into two strings. |
| D. | Comparing the two strings to define the larger one. |
| Answer» B. Extracting a substring out of a string. | |
| 2. |
What is the following code segment doing? void fn( ){ char c; cin.get(c); if (c != ) { fn( ); cout.put(c); } } |
| A. | The string entered is printed as it is. |
| B. | The string entered is printed in reverse order. |
| C. | It will go in an infinite loop. |
| D. | It will print an empty line. |
| Answer» C. It will go in an infinite loop. | |
| 3. |
What is the return value of the following statement if it is placed in C program? strcmp( ABC , ABC ); |
| A. | 33 |
| B. | 1 |
| C. | 0 |
| D. | Compilation Error |
| Answer» D. Compilation Error | |