Question: home / study / engineering / computer science / questions and answers / lab 4: requirements: compiles without warnings ... Your question has expired and
home / study / engineering / computer science / questions and answers / lab 4: requirements: compiles without warnings ... Your question has expired and been refunded. We were unable to find a Chegg Expert to answer your question. Question: Lab 4: Requirements: Compiles without warnings on ... Bookmark Lab 4: Requirements: Compiles without warnings on omega using gcc -std=c89 -g pedantic filename.c Read in a class roster input file given as a command line argument to the program and save it into a queue data structure by using a linked listThe input file will be supplied and have a format as follows First_Name Last_Name ID Age Names will be no longer than 20 characters long The program must read from the file safely The program must gracefully exit if the input file command line parameter is not given The structs needed for the program are: struct student_record { int student_id_; int student_age_; char first_name_[21]; char last_name_[21]; }; struct student_record_node { struct student_record* record_; struct student_record_node* next_; }; Write a function to read in the class roster input file and create the queueIt will have the prototype: void parseFile(char* filename, struct student_record_node** head) Write a function that will print the contents of a struct student_record_nodeIt will have the prototype: void printNode(struct student_record_node* node) Write a function that will allocate and initialize a struct student_record_nodeIt will have the prototype: Struct student_record_node* student_record_allocate() Write a function that will free the memory occupied by a struct student_record_nodeIt will have the prototype: Void student_record_node_deallocate(struct student_record_node* node) Write a function that will sort the linked list by student ageIt will have the prototype: void sortByAge(struct student_record_node** recordsHead) Write a function that will sort the linked list by student idIt will have the prototype: void sortById(struct student_record_node** recordsHead) Write a function that the sorting functions will use for swapping the VALUES of nodes of a linked list(this is important. We are sorting by swapping values, not by changing position of a node. We will do actual position swapping in lab 5) void swap(struct student_record_node** node1, struct student_record_node** node2) Write a function that will free the memory occupied by the QueueIt will have the prototype: void freeNodeList(struct student_record_node* head) Write a function that will append a node to the QueueIt will have the prototype: void appendNode(struct student_record_node* head, struct student_record_node* newNode) Write a function that will print the QueueIt will have the prototype: void printNodeList(struct student_record_node* head) All source code will be in 1 file studentNumber_xyz_homework4.c where xyz are the students initials. Main must be the first function defined There must be NO memory leaks You MUST write safe code in regards to dynamic memory allocation AND pointers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
