Question

Consider a `LinkedList` data structure. Which control flow statement is most appropriate for iterating through all elements of the list from head to tail? 

A A `do-while` loop that always executes at least once.
B A `for` loop with a fixed number of iterations.
C A `while` loop that continues as long as the current node is not `null`.
D A `switch-case` statement based on node values.
Practice Next

Hey! Ask a query