Question: For questions 1 through 5, assume the following singly-linked node class and variable declarations: 12 struct node{ 13 int data; 14 node *next; 15

For questions 1 through 5, assume the following singly-linked node class and variable declarations: 12 struct node{ 13 int data; 14 node *next; 15 16 }; 17 18 class List( 19 private: 20 21 22 23 26 25 26 27 20 29 30 31 int size; node *head; node tail; public: List()(head NULL; tail = NULL; size=0;} //another constructor List (const int &value) { node temp new node(); temp->data head temp; tail-temp; value; 32 33}; 1. What is the data type of the expression temp->next? 2. What is the data type of the expression temp->data? 3. What is the data type of the expression temp? After a linked list gets initialized with the following statement, answer questions 4 and 5: List myList(5); 4. What is the value of head->data of myList? 5. What is the value of head->next of myList?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
