Solved

Given a Linked List Using the Code from the Book)

Question 6

Multiple Choice

Given a linked list using the code from the book) , which of the following sets of statements would implement a function to return the last item in the list?


A) NodePtr here;
Here=head;
Whilehere->link != NULL)
{
Here = here ->link;
}
Return here->data;
B) NodePtr here;
Here=head->link;
Whilehere != NULL)
{
Here = here ->link;
}
Return here->data;
C) NodePtr here;
Whilehere->link != NULL)
{
Here = here ->link;
}
Return here->data;
D) NodePtr here;
Here=head;
Whilehere->link != NULL)
{
Here = here ->link;
}

Correct Answer:

verifed

Verified

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

Related Questions