Contents

Which of the following symbol is used to enclose if statement?
a) {}    
b) []                 
c) ()                 
d) <>

c

Which of the following is not part of if statement?
a) a condition that evaluates
b) a condition that evaluates true or false
c) a true block             
d) false blocks

a

Which statement executes block of statement when condition is true and execute other statement when condition is false?
a) if statement     
b) if-else statement
c) switch statement      
d) none of these

b



Which of the following is the correct syntax of if-else statement?
a) if(condition) statement                     
b) else statement
c) if statement             
d) both a & b

d

If you must make decision based on multiple choices, which of the following is best suited?
a) if                             
b) else
c) if-else                                  
d) if-else-if

c

Which of the following is used for multiple choices or selection among statements?
a) if statement    
b) if-else statement
c) nested if         
d) switch statement

d