Multiple Choice
In the following search function for a linked list using the Node and NodePtr as defined in the text) , why is there code to check if here is NULL?
NodePtr searchNodePtr head, int target)
{
NodePtr here = head;
Ifhere == NULL)
{
Return NULL;
}
Else
{
While here->data != target && here->link != NULL)
{
Here = here->link;
}
Ifhere->data == target)
{
Return here;
}
Else
{
Return NULL;
}
}
}
A) the list may be empty
B) the list may be full
C) there is no reason for that code to be there
D) A and B
Correct Answer:

Verified
Correct Answer:
Verified
Q16: A queue is first-in-first-out data structure.
Q17: The number of possible nodes in a
Q18: Data is removed from a stack in
Q19: Data is inserted into a queue at
Q20: The linked list is always the most
Q22: Most applications that use a stack will
Q23: *head.item is the same as *head).item
Q24: A _ is a list constructed using
Q25: The last node in a linked list
Q26: The stack can be compared to a