Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

What is the one statement that can be used to insert a new node at the head of a linked list. Assume that the list's head_pointer is called head_ptr and the that the data for the new node is called entry.

OpenStudy (rsmith6559):

It would have to be a function call. To do that, you're new node's pointer (singly linked list) has to be set to the value of head_ptr and then head_ptr has to be set to point at your new node. That's two assignments. I don't know of any statement that will do that.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!