Question Detail

COS 102 6 lecture note; fundamentals of programming Objective Question

Question

Which type of control statement allows a program to test several conditions and execute instructions based on which condition is true?
Options
A Sequential Control Statement
B Selection/Decision Control Statement
Correct Answer
C Repetition Control Statement
D Branching Control Statement
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 20 of the document defines Selection/Decision Control Statements: 'The selection statement allows a program to test several conditions and execute instructions based on which condition is true.'

Hint

Consider the purpose of choosing different paths based on conditions.

Question Info