Andrew H.
asked 01/17/21C Programming (Prompt and attempt at solution)
The program expects the name of an input file and an output file to be given by the user. If
the user does not input any names, default file names should be used, such as input.txt
and output.txt. The input files have lines which look like this:
3 Tester College; 1909 33001
The first number represents the rank; it is followed by the school name, year founded,
and approximate number of students.
Read the list of colleges into an array of structures. You may assume that the maximum
size of a college name string is 64.
The program should use either the insertion sort algorithm or the selection sort algorithm
to sort the array in descending order by rank.
Display any k consecutive schools requested by the user. For instance, if the user enters 1
2, the program displays the first 2 schools in a readable format of your choice. If the user
enters 1 5, the program displays the first five schools, if the user enters 2 7, display 7
schools beginning with the one at index 1 (2 - 1), and so on. Repeat this process until the
user enters 0 0. Reject invalid input (such as -1 5, or 1 200, etc.)
Finally write the sorted array to the output file, using the same format as in the input
file’s format.
Run the program once and save the screen output at the end of the source file as a
comment.
input.txt
3 Tester College; 1929 33001
5 Aponoeo College; 1964 22300
9 Arizona College; 1942 4000
7 Westside College; 1972 9506
2 Apollo College; 1917 25300
8 Sidester College; 1947 4760
4 Diablo Valley College; 1939 24781
6 Foothill College; 1947 18362
1 College of the Herch; 1957 24712
10 Quelsa College; 1953 19571
1 Expert Answer

Patrick B. answered 01/17/21
Math and computer tutor/teacher
Source code has been uploaded to the RESROUCES section and this link in the description..
It's too big to fit here...
Optionally, shoot me an email and I will attach or pass you a link to the google drive
My email, in ENGLISH, is:
patrick dot baldwin dot 1 at wyzant dot com
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Andrew H.
https://docs.google.com/document/d/1BKQ9dpyTjJ4AOXI1UH7z2X3lApJUzb-qc-bJ3X323AA/edit?usp=sharing01/17/21