Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question

Write down this following program using 'C' language programming.

At Unknown University, Admissions department has discovered that best applicants usually go to big-name schools instead and the worst often do badly in courses, so school wants to concentrate recruitment efforts and economic aid resources on middle half of the applicants. You must write a program that takes a file containing a list of applicants, in which every 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, and then alphabetize the rest). This could be done using a simple iterative technique. First, read data from a file named apply.txt into an array of structures (let N be the total number of applicants). This starts a loop that eliminates applicants one at a time, until only half are left. Within this loop, let first be a pointer to 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.a

b) if r is odd, find 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 values of first and r.
When only half applicants are left, use any sort technique to sort them alphabetically. Write down the sorted list to a user-specified output file.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9718173

Have any Question?


Related Questions in Computer Engineering

Question interface design guidelines please respond to the

Question: "Interface Design Guidelines" Please respond to the following: • Imagine you are leading a team of designers for a new software product. During the kickoff meeting, the team starts to discuss design guidelines. ...

1 a router operates at which osi layer application

1. A router operates at which OSI layer? Application Presentation Session Transport Network Data Link Phsical 2. Suppose application data of size X bytes is transmitted from system A to system B via the OSI layers and th ...

What statistic was calculated to determine differences

What statistic was calculated to determine differences between the intervention and control groups for the lumbar and femur neck BMDs? Were the groups significantly different for BMDs?

Part 1 if false change the incorrect parts to make them

Part 1, If false, change the incorrect parts to make them true. DO NOT NEGATE THE FALSE SENTENCES. 1. According to the weak-form efficient market hypothesis, investors can take advantage of historical information. 2. The ...

A financial analyst examined the possible returns from

A financial analyst examined the possible returns from several financial investments. When the performance of these investments was later examined, it turned out that 25% performed much better than the market average, 25 ...

One of the authors received a credit card bill for 2988 but

One of the authors received a credit card bill for 2,988, but it included a charge of 1,834 that was not valid. Find the values of the absolute and relative errors the absolute value is 1,834 what is the relative errors?

On the spot courier services grew and changed over the

On the Spot courier services grew and changed over the years. At first, Bill received requests for package pickups on his mobile phone, recorded that information in a log, and would then drive around to retrieve all the ...

Two one-cent coins were weighed on an electronic balance of

Two one-cent coins were weighed on an electronic balance of high sensitivity, and an average mass per coin of 2.4918 g was obtained from the data. How could you use the same number of significant figures as the value obt ...

A salesforce from an ecommerce global organization has

A salesforce from an ecommerce global organization has begun to raise some concerns about the orders they are transmitting over the Internet from their customers' site to the organization's global headquarters. It seems ...

The appendix to chapter one will be very useful in

The appendix to chapter one will be very useful in answering this question, if you need a refresher or introduction to regression analysis. The following equation is the regression results of a study on infant mortality ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As