For a non-empty linked list, select the code that should appear in a function that adds a node to the end of the list. newPtr is a pointer to the new node to be added and lastPtr is a pointer to the current last node. Each node contains a pointer nextPtr.
a. lastPtr->nextPtr = newPtr;
lastPtr = newPtr
b. lastPtr = newPtr;
lastPtr->nextPtr = newPtr
c. newPtr->nextPtr = lastPtr;
lastPtr = newPtr
d. lastPtr = newPtr;
newPtr->nextPtr = lastPtr
a. lastPtr->nextPtr = newPtr;
lastPtr = newPtr
You might also like to view...
Jenna is working on a database that stores a company's invoices. The database includes a Table called Invoices, which has a column called outBalances that shows all outstanding balances. Jenna's boss has asked her to design a query that calculates the numerical mean of all outstanding balances. Which function should Jenna use on the outBalances column to help her complete this task?
A) Max B) Count C) Avg D) Sum
A technician moves a VoIP phone to a new location, but discovers the phone does not start up when plugged into the network. Which of the following explains this situation?
A. The switch does not support PoE. B. The jack needs to be rewired using the 568B standard. C. QoS is not enabled on the switch. D. The phone needs a fiber port