Question

A program needs to process elements from a `Queue` until it becomes empty. Which control flow structure is most suitable for this task? 

A `for` loop with a fixed counter.
B `if-else` statement.
C `while` loop checking if the queue is not empty.
D `switch-case` statement based on the first element.
Practice Next

Hey! Ask a query