The admissions department has discovered


At Unknown University, the Admissions department has discovered that the best applicants usually go to big-name schools instead and the worst often do poorly in courses, so the school wants to concentrate recruitment efforts and financial aid resources on the middle half of the
applicants. You must write a program that takes a file containing a list of applicants, in which each applicant has a name and a total SAT score, and prints an alphabetical list of the middle half of these applicants. (Eliminate the best quarter and the worst quarter, then alphabetize the rest). This can be done using a simple iterative technique. First, read the data from a file named apply.txt into an array of structures (let N be the total number of applicants). This begin a loop that eliminates applicants one at a time, until only half are left. Within this loop, let first be a pointer to the first array element that is still included, last be a pointer to the last one,and r (the number of remaining) be initialized to N. Each time around the loop, either first is incremented or last is decremented and r decreases by 1. At each step, 

a) If r is even, find the remaining applicant with the lowest SAT score and swap it with the applicant at first. Then increment first, decrement r,and repeat.
b) If r is odd, find the remaining applicant with the highest SAT score and swap it with the applicant at last. Then decrement last and r and repeat.
c) Quit when r <= N/2. Return the values of first and r.
When only half the applicants are left, use any sort technique to sort them alphabetically. Write the sorted list to a user-specified output file. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The admissions department has discovered
Reference No:- TGS088860

Expected delivery within 24 Hours