Question: Consider the following partial node class definition, with member functions called data and link, for questions 3-5. class node public: int data() return data field;

 Consider the following partial node class definition, with member functions called

Consider the following partial node class definition, with member functions called data and link, for questions 3-5. class node public: int data() return data field; node* link() return link field; private: int data field; node* link field; }; 3. Suppose we are using the node class definition listed above. Your program is using a node* variable called head ptr to point to the first node of a linked list (or head ptr == NULL for the empty list). Write a few lines of CH code that will print all the integers in the list. 4. Suppose cursor points to a node in a linked list (using the node definition above). What statement changes cursor so that it points to the next node? A. cursor++; B. cursor = link(); C. cursor +=link(; D. cursor = cursor->link(; 5. Suppose cursor points to a node in a linked list (using the node above). What Boolean expression will be true when cursor points to the tail node of the list? A. cursor ==NULL; B. cursor->link == NULL; C. cursor->data() == NULL; D. cursor->data =0.0; E. None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets address the questions one by one 3 Print All Integers in the List To print all integer... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!