MCQ

M4735 · [1]
A singly linked list holds the values 4, 9, 16, 25 in that order. HEAD references the first node. Each node has fields DATA and NEXT, and the last node's NEXT is NULL. CURRENT = HEAD COUNT = 0 loop while CURRENT.NEXT ≠ NULL COUNT = COUNT + 1 CURRENT = CURRENT.NEXT end loop output COUNT, CURRENT.DATA What is output?
Checks instantly · free · no account Keys A–D to answer

IBMarker is not affiliated with the International Baccalaureate Organization (IBO). All questions are original, written in the style of the IB Diploma Programme.

Next question →
free · no account