- Home
- C Programming MCQ
- C Programming MCQ
- C Programming MCQ - Set 1
- C Programming MCQ - Set 2
- C Programming MCQ - Set 3
- C Programming MCQ - Set 4
- C Programming MCQ - Set 5
- C Programming MCQ - Set 6
- C Programming MCQ - Set 7
- C Programming MCQ - Set 8
- C Programming MCQ - Set 9
- C Programming MCQ - Set 10
- C Programming MCQ - Set 11
- C Programming MCQ - Set 12
- C Programming MCQ - Set 13
- C Programming MCQ - Set 14
- C Programming MCQ - Set 15
- Conditional Statements & Loops MCQ
- Conditional Statements & Loops MCQ
- Conditional Statements & Loops MCQ - Set 1
- Conditional Statements & Loops MCQ - Set 2
- Conditional Statements & Loops MCQ - Set 3
- Conditional Statements & Loops MCQ - Set 4
- Conditional Statements & Loops MCQ - Set 5
- Conditional Statements & Loops MCQ - Set 6
- Conditional Statements & Loops MCQ - Set 7
- Conditional Statements & Loops MCQ - Set 8
- Conditional Statements & Loops MCQ - Set 9
- Conditional Statements & Loops MCQ - Set 10
- Conditional Statements & Loops MCQ - Set 11
- Conditional Statements & Loops MCQ - Set 12
- Conditional Statements & Loops MCQ - Set 13
- Conditional Statements & Loops MCQ - Set 14
- Conditional Statements & Loops MCQ - Set 15
- Conditional Statements & Loops MCQ - Set 16
- Conditional Statements & Loops MCQ - Set 17
- Conditional Statements & Loops MCQ - Set 18
- Conditional Statements & Loops MCQ - Set 19
- Conditional Statements & Loops MCQ - Set 20
- Conditional Statements & Loops MCQ - Set 21
- Conditional Statements & Loops MCQ - Set 22
- Conditional Statements & Loops MCQ - Set 23
- Conditional Statements & Loops MCQ - Set 24
- Conditional Statements & Loops MCQ - Set 25
- Conditional Statements & Loops MCQ - Set 26
- Conditional Statements & Loops MCQ - Set 27
- Conditional Statements & Loops MCQ - Set 28
C Programming Multiple Choice Questions (MCQ)
C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 23
![]() Share with a Friend |
Multiple Choice Questions
C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 23
111. Study the following 'C' program
#include <stdio.h>
void main ()
{
static a, b;
while (a > b ++)
}
What will be the value of a and b on the execution of above program?
A). a = 0, b = 1
B). a = 0, b = 0
C). a = 1, b = 1
D). None of these
View Answer
Correct: A
112. Choose facts about continue; statement is C Language.
A). continue; is used to take the execution control to next iteration or sequence
B). continue; statement causes the statements below it to skip for execution
C). continue; is usually accompanied by IF statement.
D). All the above.
Correct: D
113. If the following loop is implemented
void main()
{
int num = 0;
do
{
-- num;
printf (ā%dā, num);
num ++;
}
while (num >=0);
}
A). A run time error will be reported B). The program will not enter into the loop
C). The loop will run infinitely many times
D). There will be a compilation error reported
View Answer
Correct: C
114. What is the output of C Program ?
int main()
{
int a=14;
while(a<20)
{
++a;
if(a>=16 && a<=18)
{
continue;
}
printf("%d ", a);
}
return 0;
}
A). 15 16 17 18 19 B). 15 18 19
C). 15 16 20
D). 15 19 20
Correct: D
115. Consider the following program fragment:
switch (input)
{
case '1': printf ("one");
case '3': printf ("three");
case '4': printf ("five");
default: printf ("odd"); break;
}
What will be printed when input is '3'?
A). three five odd
B). three
C). three odd
D). three odd
View Answer
Correct: B
