

MCQOPTIONS
Saved Bookmarks
This section includes 117 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
101. |
A char variable can store either an ASCII character or a Unicode character. |
A. | 1 |
B. | |
Answer» B. | |
102. |
What will be the output of the program?
#include
|
A. | y =20 |
B. | x = 0 |
C. | x = 10 |
D. | x = 1 |
Answer» D. x = 1 | |
103. |
What will be the output of the program?
#include
|
A. | C-program |
B. | Ps |
C. | Error |
D. | None of above |
Answer» B. Ps | |
104. |
Which of the following errors would be reported by the compiler on compiling the program given below?
#include
|
A. | There is no break statement in each case. |
B. | Expression as in case 3 + 2 is not allowed. |
C. | Duplicate case case 5: |
D. | No error will be reported. |
Answer» D. No error will be reported. | |
105. |
Point out the error, if any in the program.
#include
|
A. | Error: No default value is specified |
B. | Error: Constant expression required at line case P: |
C. | Error: There is no break statement in each case. |
D. | No error will be reported. |
Answer» C. Error: There is no break statement in each case. | |
106. |
Point out the error, if any in the while loop.
#include
|
A. | There should be a condition in the while loop |
B. | There should be at least a semicolon in the while |
C. | The while loop should be replaced with for loop. |
D. | No error |
Answer» B. There should be at least a semicolon in the while | |
107. |
Which of the following statements are correct about the below C-program?
#include
|
A. | 1 |
B. | 2, 3 |
C. | 3, 4 |
D. | 4 |
Answer» C. 3, 4 | |
108. |
The modulus operator cannot be used with a long double. |
A. | 1 |
B. | |
Answer» B. | |
109. |
How many times the while loop will get executed if a short int is 2 byte wide?
#include
|
A. | Infinite times |
B. | 255 times |
C. | 256 times |
D. | 254 times |
Answer» C. 256 times | |
110. |
Point out the error, if any in the for loop.
#include
|
A. | There should be a condition in the for loop |
B. | The two semicolons should be dropped |
C. | The for loop should be replaced with while loop. |
D. | No error |
Answer» E. | |
111. |
Which of the following statements are correct about the below program?
#include
|
A. | Output: Have a nice day |
B. | No output |
C. | Error: Expression syntax |
D. | Error: Undeclared identifier if |
Answer» D. Error: Undeclared identifier if | |
112. |
In mathematics and computer programming, which is the correct order of mathematical operators ? |
A. | Addition, Subtraction, Multiplication, Division |
B. | Division, Multiplication, Addition, Subtraction |
C. | Multiplication, Addition, Division, Subtraction |
D. | Addition, Division, Modulus, Subtraction |
Answer» C. Multiplication, Addition, Division, Subtraction | |
113. |
The way the break is used to take control out of switch and continue to take control of the beginning of the switch? |
A. | Yes |
B. | No |
C. | Yes |
D. | No |
Answer» C. Yes | |
114. |
What will be the output of the program?
#include
|
A. | 0, 1, 2, 3, 4, 5 |
B. | 5 |
C. | 1, 2, 3, 4 |
D. | 6 |
Answer» E. | |
115. |
A short integer is at least 16 bits wide and a long integer is at least 32 bits wide. |
A. | 1 |
B. | |
C. | 1 |
D. | |
Answer» B. | |
116. |
Which of the following is not logical operator? |
A. | & |
B. | && |
C. | || |
D. | ! |
Answer» B. && | |
117. |
How many times "IndiaBIX" is get printed?
#include
|
A. | Infinite times |
B. | 11 times |
C. | 0 times |
D. | 10 times |
Answer» D. 10 times | |