Question: You are given the following type definitions: typedef struct node node_t; typedef student_t data_t; struct node { }; data_t data; node_t *next; typedef struct
You are given the following type definitions: typedef struct node node_t; typedef student_t data_t; struct node { }; data_t data; node_t *next; typedef struct { node_t *head; node_t *foot; } list_t; list_t *make_empty_list(void); list_t *insert_at_head (list_t *list, data_t value); list_t *insert_at_foot (list_t *list, data_t value); Write a main () function that first creates an empty list, then repeatedly prompts a user to input the id and marks of a student and inserts the student to the end of the list until no more input has been entered by the user. The main () function should then print out the students (without the grades) in the list from the head to the foot, one at a line, and then free's the memory allocated for the list.
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
Certainly Based on the provided type definitions it seems like you have a linked list structure for storing student information Heres a sample main fu... View full answer
Get step-by-step solutions from verified subject matter experts
