Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

30. Select one: a. if(head->next == NULL) b. if(head == null) c. if( head == NUL

ID: 3693732 • Letter: 3

Question

30.

Select one:

a. if(head->next == NULL)

b. if(head == null)

c. if( head == NULL)

d. if( head->next==null);

e. if(head->next == NULL) and if( head->next==null);

f. if(head == null) and if( head == NULL)

12.

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?

Select one:

a.

NodePtr here;

here=head;

while(here ->link != NULL)

{

here=here ->link;

}

return here->data;

b.

NodePtr here;

here=head ->link

while(here ! = NULL)

{

here = here -> link;

}

return here->data;

c.

d.

2.

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?

Select one:

a.

b.

c.

d.

Explanation / Answer

30)c. if( head == NULL)

12) a.

NodePtr here;

here=head;

while(here ->link != NULL)

{

here=here ->link;

}

return here->data;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote