Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement all four tasks in Lab sheet #9. Please submit one single C/CPP source file which contains all of the required functions including the tasks

Implement all four tasks in Lab sheet #9.
Please submit one single C/CPP source file which contains all of the required functions including the tasks and a main function that calls and test the task functions.

c++
image text in transcribed
Task 1: Write down a complete C/C++ program to test your linear linked list implementation. Additionally, write another function which will be used to list the linked list content. Complete your implementation using the following code: header - insertBack (header, 2); header = insertBack (header, 4); header = insertBack (header, 6); DisplayList (header); header = insert Front (header, 1); DisplayList (header); insertAfter (header->next->next, 5); DisplayList (header); header = deleteFront (header); DisplayList (header); header = deleteBack (header); DisplayList (header); deleteAfter (header->next); DisplayList (header); Task 2: Write a function that moves a node forward in the given linked list. Take the pointer of the node to be moved as a parameter. void moveforwardlist (struct node * struct node *); Task 3: Write a function that moves a node backward in the given linked list. Take the pointer of the node to be moved as a parameter void movebackwardlist (struct node * struct node *); Task 4: Write a function that loads the linked list with the given values of an array. Consider array and its size as input parameter to the function. void loadlist (struet node *, int | 1, int ); 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

How can you explain high labour turnover in the call centre?

Answered: 1 week ago