Question 1 |
We can use semicolon at the end of switch case.
switch(count);Or
#include <stdio.h> int main(int argc, char *argv[]) { switch(1) { case 1: printf("hello"); break; }; return 0; }State Whether True/False ?
True | |
False |
Question 2 |
We can use "Semicolon" at the end of switch case.
State Whether True/False ?False | |
True |
Question 2 Explanation:
Semicolon is Written after case label -
case 4 :
Question 3 |
Two or more cases may share one break statement
State Whether True/False ?True | |
False |
Question 4 |
We can use "Integer" Variable as Switch Case Label but not "Floating Point" variable
State Whether True/False ?False | |
True |
Question 4 Explanation:
We cannot use Variable of any type inside switch case as "Switch Label"
Question 5 |
Continue Statement can be used inside switch case under any of the label.
State Whether True/False ?False | |
True |
Question 6 |
Nesting of Switch Case is allowed.
switch(alpha) { case 'a': case 'A': printf("Alphabet A"); break; case 'b': case 'B': switch(alpha) { } break; }State Whether True/False ?
False | |
True |
Question 7 |
Break Statement takes control out of the switch
State Whether True/False ?False | |
True |
Question 8 |
Switch case can have case label as variable of type "const".
int const var = 2; switch(num) { case var: printf("Number = 2"); break; }State Whether True/False ?
False | |
True |
Question 9 |
Arrange Following Programming Languages in the Chronological Order of there development -
B |
K&R; C |
C |
C++ |
BCPL |
ANSI C |
4 1 5 2 6 3 | |
4 1 5 3 2 6 | |
1 4 5 2 3 6 | |
4 1 5 2 3 6 |
Question 9 Explanation:
1967 ===> BCPL 1970 ===> B 1972 ===> C 1976 ===> K&R C 1980 ===> C++ 1989 ===> ANSI C
Question 10 |
"default" Label is Optional in Switch Case.
State Whether True/False ?True | |
False |
Question 10 Explanation:
It is not always necessary to use default label inside switch case.
There are 10 questions to complete.