Question Detail

COS 102 6 lecture note; fundamentals of programming Objective Question

Question

What is the purpose of a Selection/Decision Control Statement?
Options
A To execute statements in a fixed, linear order.
B To repeatedly execute a block of code.
C To test several conditions and execute instructions based on which condition is true.
Correct Answer
D To define new functions and procedures.
Correct Answer

Option C is the correct answer.

Detailed Explanation

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

Hint

Look at the description for 'Selection/Decision Control Statements' on slide 20.

Question Info