MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the instructions IF, THEN and ELSE points to what to do if the answer to the question is FALSE?
A
IF
B
THEN
C
ELSE
D
None of the above
Explanation: 

Detailed explanation-1: -ELSE IF represents another question. THEN points to what to do if the answer to that question is true. ELSE points to what to do if the answer to the question is false.

Detailed explanation-2: -Computer programs also make decisions, using Boolean expressions (true/false) inside conditionals (if/else).

Detailed explanation-3: -Use else to specify a block of code to be executed, if the same condition is false. Use else if to specify a new condition to test, if the first condition is false.

Detailed explanation-4: -Using the OR operator, we can create a compound expression that is true when either of two conditions are true.

Detailed explanation-5: -Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a “text-based” detail (algorithmic) design tool. The rules of Pseudocode are reasonably straightforward. All statements showing “dependency” are to be indented. These include while, do, for, if, switch.

There is 1 question to complete.