Question: Now that you have had the experience building a program that demonstrated using a singly linked list that held integers, you will now produce a

Now that you have had the experience building a program that demonstrated using a singly linked list that held integers, you will now produce a program that holds other kinds of data that we read from a file. We are doing so to demonstrate how little changes, other than your test software and the definition of what UserData is composed of!
The Solution Steps:
1. Create a project by copying the provided 4 files into a project, building it and running it. The files are:
a. UserData.h this file defines what each node contains
b. LinkedList.h this file contains the declarations of the linked list functions
c. SinglyLinkedList.c this file is the implementations of all of the singly linked list functions
d. LinkedListTester.c this file contains the implementation of a test routine for the linked list functions.
2. We will be handling data in our linked list that consists of an integer and a character string. Modify the UserData structure so that it looks as follows:
typedef struct
{
int importance;
char taskName[80];
} UserData, *UserDataPtr;
3. Place the following test data in a file. You can name the file whatever you want, but I would suggest something like "testData.txt".
1 task1
2 task2A
3 task3A
2 task2B
4 task4A
4 task4B
3 task3B
4. Your test program will be a modified version of LinkedListTester.c. It must be modified to read in the data from a file instead of using the initialized array of integers to hold the data. Note that each line in the file contains an integer and a task name (no spaces in the task name), so reading is probably best done using a %d %s format. What else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!