MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The second part of if, that is executed when the condition is false
A
if
B
else
C
for
D
input
Explanation: 

Detailed explanation-1: -The do-while loop is an exit controlled loop, where even if the test condition Is false, the loop body will be executed at least once.

Detailed explanation-2: -The for statement lets you repeat a statement or compound statement a specified number of times. The body of a for statement is executed zero or more times until an optional condition becomes false.

Detailed explanation-3: -If you have an action you want to execute when the condition is false, then you need an else clause. You can have a series of tests by following the initial if with any number of else if s. Here is an example of a valid if/else structure.

Detailed explanation-4: -When condition becomes false, control passed to the first statement that follows body of the loop. While loop will be executed atleast 0 times.

There is 1 question to complete.