- 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 28
![]() Share with a Friend |
Multiple Choice Questions
C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 28
136. What is the output of C Program with switch statement or block ?
int main()
{
int k=8;
switch(k)
{
case 1==8: printf("ROSE ");break;
case 1 && 2: printf("JASMINE "); break;
default: printf("FLOWER ");
}
printf("GARDEN");
}
A). ROSE GARGEN B). JASMINE GARDEN
C). FLOWER GARDEN
D). Compiler error
View Answer
Correct: C
137. What is the output of C Program with switch statement or block ?
int main()
{
int k=25;
switch(k)
{
case 24: printf("ROSE ");break;
case 25: printf("JASMINE "); continue;
default: printf("FLOWER ");
}
printf("GARDEN");
}
A). JASMINE GARDEN B). JASMINE FLOWER GARDEN
C). FLOWER GARDEN
D). Compiler error
Correct: D
138. What is the output of C Program with switch statement or block ?
int main()
{
switch(24.5)
case 24.5: printf("SILVER ");break;
case 25.0: printf("GOLD "); break;
default: printf("TIN ");
}
printf("COPPER");
}
A). SILVER COPPER B). TIN COPPER
C). COPPER
D). Compiler error
View Answer
Correct: D
139. Choose a correct statement about a C Switch Construct.
A). default case is optional inside switch.
B). break; causes the control to exit the switch immediately and avoid fall down to other CASE statements.
C). You can not use duplicate CASE Constants inside a Switch construct.
D). All the above.
Correct: D
140. In switch statement, each case instance value must be ?
A). Constant
B). Variable
C). Special Symbol
D). None of the above
View Answer
Correct: A
