default case is optional inside switch.
break; causes the control to exit the switch immediately and avoid fall down to other CASE statements.
You can not use duplicate CASE Constants inside a Switch construct.
All the above.
It allows the use of multiple alternatives for an expression
It is used to execute code conditionally based on the evaluation of a Boolean expression
It is used to execute a sequence of statements multiple times
It allows the execution of code based on multiple expressions
int
char
long
all of the mentioned
What is the output of the following code?
int a = 5, b = 10;if (a < b)printf("a is less than b");elseprintf("a is greater than or equal to b");
a is greater than or equal to b
a is less than b
Compiler Error
Undefined
In the following nested conditional statements, which branch will execute?
int x = 4;if (x > 2) { if (x < 5) { printf("x is between 2 and 5"); }} else { printf("x is 2 or less");}
x is between 2 and 5
x is 2 or less
Error
No output
All of the above
Character
Integer
Float
enum
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
int x = 5;if (x > 3) { printf("Greater than 3"); } else { printf("Not greater than 3"); }
Greater than 3
Not Greater than 3
No Output
end;
break;
Stop;
A semicolon.
do-while
if-else
for
while
constants
variable
Text
String
short
float