Question

In a program that manages a collection of `Employee` objects, each with a `salary` attribute, which control flow mechanism would be most efficient to find all employees whose salary is above a certain threshold? 

A A `goto` statement to jump to a specific code block.
B An `if-else if-else` ladder for each possible salary range.
C A loop iterating through the collection, using an `if` statement to check the salary condition.
D Recursion to traverse the employee list.
Practice Next

Hey! Ask a query