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:
Verified
Q36: The number of possible nodes in a
Q37: The function used to get the data
Q38: The arrow operator ->) combines the actions
Q39: The first node in a linked list
Q40: In a node type named MyNode, which
Q42: A stack exhibits _ behavior
A) last-in/ first-out
B)
Q43: If NodeTypePtr is defined to be a
Q44: Given the following declarations, which statement would
Q45: The actual value of NULL is
A) -1
B)
Q46: As defined in the text, the pointer
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents