Which statement is used to select a block of statement is based on the value or variable?
a) if statement
b) if-else statement
c) nested if
d) switch statement
if there is no match the default block of variable is executed is called……
a) if statement
b) if-else statement
c) nested if
d) switch statement
The conditional operator is also known as
a) relational operator
b) binary operator
c) ternary operator
d) chary operator
Explanation: Ternary operator that works with more than two vales
Which of the following keyword is used followed by case statement?
a) colon(:)
b) semicolon(;)
c) comma(,)
d) equal (=)
Which of the following is an invalid if-else
statement?
a) if (if (a == 1)) {}
b) if (a){}
c) if ((char) a) {}
d) if (func1 (a)) {}
Which structure can be enclosed inside another selection structure?
a) if statement
b) if-else statement
c) nested if
d) switch statement