Multiple Choice
Given a linked list using the code from the book) and assuming there are at least two nodes in the list, which of the following sets of statements would implement a function to return and remove the last item in the list?
A) NodePtr here;
Here=head;
Whilehere->link != NULL)
{
Here = here ->link;
}
Return here->data;
Delete here;
B) NodePtr here;
Here=head;
Whilehere->link != NULL)
{
Here = here ->link;
}
Delete here;
Return here->data;
C) int tmp;
NodePtr here, there;
Here=head;
Whilehere->link != NULL)
{
There = here;
Here = here ->link;
}
There->link = NULL;
Tmp=here->data;
Delete here;
Return tmp;
D) int tmp;
NodePtr here, there;
Here=head;
Whilehere->link != NULL)
{
There = here;
Here = here ->link;
}
There->link = NULL;
Tmp=here->data;
Return tmp;
Delete here;
Correct Answer:

Verified
Correct Answer:
Verified
Q4: Given the following stack declaration, which of
Q5: The arrow operator ->) specifies<br>A) a member
Q6: Given a linked list using the code
Q7: The constant NULL can be assigned only
Q8: If you want to make your linked
Q10: To add an item to a stack,
Q11: In a node type named MyNode, which
Q12: Dynamically allocated memory that is no longer
Q13: A stack is a specialized type of
Q14: If head is a NodePtr pointer variable,