Contents

Which of the following is not a loop structure?
a) switch                                               
b) while loop
c) do while loop   
d) nested loop

a

The continue statement cannot be used with…
a) switch                                               
b) while loop
c) do while loop   
d) nested loop

a

Which statement control shift back to the beginning of the loop?
a) default                             
b) break
c) continue                           
d) loop

c

In do-while loop the condition executes
a) after body                       
b) before body
c) both a & b                       
d) none of these

a

What is the output of following code?
if(1==2) cout<<”Hello”;
else if (2==1) cout<<”World”;
a) no output                         
b) Hello
c) World                                
d) Helloworld

a

What is the output of following code?
cin>>angle;
if(angle>5) angle=anlge+5;
else if(angle>2) angle=anlge+2;
else angle=angle+15;
a) 15      
b) 25                      
c) 35                      
d) 40

a