Contents

Which keyword can be used for coming out of recursion?
a) return                                              

b) break
c) exit                                                    

d) none of these

a

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)) {}

a

Switch statement accepts…….
a) int                                                      

b) char
c) long                                                   

d) all of these

d

 Which loop is guaranteed to execute at least one time?
a) for                                                     

b) while
c) do while                                           

d) switch

c

A labeled statement consists of an identifier followed by
a) colon(:)                                            

b) semicolon(;)
c) comma(,)                                         

d) equal (=)

a

do-while loop terminates when conditional expression returns?
a) one                                                    

b) zero
c) non-zero                                           

d) none of these

b