Question: C++ Programming 1 Write a C++ code using a while statement to compute the average of all alternative nodes (1st,3rd,5th) in the given linked list
C++ Programming



1 Write a C++ code using a while statement to compute the average of all alternative nodes (1st,3rd,5th) in the given linked list where the first node is pointed to by first. 10 NOTE: Each node has data member that stores the data and the next member that stores the address of the next node. ( means; there are any number of nodes)Use the following declaration: struct Node { int data: \}; double total =0; double average; Node* temp =first int count =; Node* next: first Q.2 The pointer variable first points to the first node of a linked list. The declaration of the node is given below. I) Write C++ code to insert a new node q in the front of the linked list shown below. After insertion the node pointed to by q becomes the first node of the linked list. 5 Q. 3. After many insertions and deletions of items to a circular queue; the final status looks like the figure given below: myFront =4 and myBack =2 n a. How many items are in the circular queue? b. What are the items? (Write characters) c. What is the front item (letter) in the queue? d. What is the rear item (letter) in the queue? e. If ' F is inserted in the existing queue; what will be the value of myBack and myFront? myFront = and myBack = f. If the front item is removed; what will be the value of myFront and myBack? myFront = and myBack =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
