Contents

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

a

A statement that uses relational operators to compare two values……
a) conditional statement   
b) logical statement
c) relational expression   
d) Boolean statement

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