Your
program should read the input files and holds the data in the given following structs:
struct student{
char stid[15];
char name[30] ;
char surname[30];
course *coursenode;
student *next;
};
struct course{
char ccode[10];
char cname[50];
course *next;
};
3 input files are given(mat101.txt, fiz101.txt, eng101.txt). There exist course code and course name at the
beginning of each input file. The program should generate the union of 3 input files as a single output file.
Sample output file:
1001001 MUHAMMET DORUK MAT101 MATHEMATICS1 FIZ101 PHYSICS1
1001002 ADEM SANLIALP MAT101 MATHEMATICS1
.....
The program should also have the following functions:
-setList(): Function should read the input files and constitutes the multilist. Multilist should hold the data in
ascending order of student numbers.
-deleteCourse(): Takes the student number and the course name from the user and deletes the relationship
between the given course of the given student.
-deleteStudent(): Takes the student number and deletes the student.
-display(): Prints the multilist to the screen.
-findIntersection(): Takes the number of courses whose intersection will be found (between 1-3), then reads the
course codes according to the entered number. Finally, prints the common students of the courses.
-findUnion():Takes the number of courses whose union will be found(between 1-3), then reads the course codes
according to the entered number. Finally, prints the union of the entered courses’ students.
-findDifference(): Takes two course that wanted to find the difference and prints the difference of first entered
course from the other. Eg. A-B will be used as findDifference(A, B).
-search(): Ask two options to the user:-Search student id, -Search student surname. Then the program searches
according to the entered option.
-printToFile():