Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 3 - No. 16)

What is the purpose of a 'selection' structure in programming?
To repeat a block of code multiple times.
To choose between different blocks of code based on a condition.
To store a collection of data items.
To define the order in which instructions are executed.

Explanation

Selection structures (e.g., IF statements) allow code execution to branch based on conditions.

Comments (0)

Advertisement