Solved

Which of the Following Loops Correctly Uses Iter as an Iterator

Question 53

Multiple Choice

Which of the following loops correctly uses iter as an iterator to move through the nodes of the linked list?
NodePtr iter; //a pointer to a node


A) whileiter != NULL) iter++;
B) whileiter != NULL) iter=iter->link;
C) foriter=NULL; iter != NULL; iter=iter->link)
D) for iter=head; iter != NULL; iter=iter->link)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions