

MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
1. |
What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? |
A. | The element will be set to 0. |
B. | The compiler would report an error. |
C. | The program may crash |
D. | None of the above |
E. | |
Answer» D. None of the above | |
2. |
Let x be an array.Which of the following operations is illegal? i) ++x. ii) x+1. iii) x++. iv) x*2. |
A. | I and II |
B. | I, III and IV |
C. | III and IV |
D. | II and III |
Answer» E. | |
3. |
Which of the following statements are correct ? 1: A string is a collection of characters terminated by '. 2: The format specifier %s is used to print a string. 3: The length of the string can be obtained by strlen(). 4: The pointer CANNOT work on string. |
A. | 1,2,3 |
B. | 1,2 |
C. | 2,4 |
D. | 3,4 |
Answer» B. 1,2 | |
4. |
How will you print on the screen? |
A. | printf(""); |
B. | printf(''); |
C. | printf("\n"); |
D. | printf(""") |
Answer» D. printf(""") | |
5. |
Length of the string "letsfindcourse" is |
A. | 13 |
B. | 14 |
C. | 15 |
D. | 12 |
Answer» C. 15 | |