MCQs
The counter will increment by the power of two.
Output:
2
4
16
Loop till the condition is met and break when the condition is not satisfied.
Output:
1
4
9
16
25
a and b are not similar hence the else condition will get executed.
Output:
Not same
Loop till the condition is met and break when the condition is not satisfied.
Output:
12345678910
77
Boolean operator || evaluates to true only when both the values are true or one is true and other is false.
Until the condition is not met execute the loop.
Output:
hungry
The do statement here indicates that till the while condition is true execute the instructions and will print a*b only till a
Output:
50
56
The do statement here indicates that till the while condition is true execute the instructions.
Output:
321
Execute the loop till the condition is met.
Output:
10
12
14
16