This assignment is to understand how to declare and manipulate structures including an array of structures.
The input and output in this program is done by program using file operations. This program uses basic file io.
1.) Input File(input_file.txt)
2.) Required C Code file(structures.c)
Click on the links given above to download required files.
sorting() function is used to sort the array of structures based on the id's of students. In this code selection sort is used to sort the array. This works by selecting the relatively smaller element and replacing it larger one.
1.) Download above given files in same directory.
2.) Open terminal and go to the directory where you have saved that files.
3.) Write below given commands:
1.) gcc structures.c
2.) ./a.out
3.) Code is executed and to see output open the output_file.txt or use command cat output.txt