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.
constants
variable
Text
String
Character
Integer
Float
enum
int
char
long
All of the above
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
What is the output of the following code?
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
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
end;
break;
Stop;
A semicolon.
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
short
float
do-while
if-else
for
while
all of the mentioned
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