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.:- M9132921

Have any Question?


Related Questions in Computer Engineering

Test 1 - open loop level step response test1objective to

Test 1 - Open Loop Level Step Response Test 1)Objective: To get familiar with the process vessel and to measure the time constant. Procedure 1 1) Start the CE2000 software and load ?le ‘exp4-1.ict'. You will see the soft ...

Access your browsers security settings and configure the

Access your browser's security settings and configure the browser to refuse all cookies or to prompt you before allowing a cookie. Restart the browser; then visit several different Web sites. Be sure to visit popular sit ...

Research the fire at the federal aviation administration

Research the fire at the Federal Aviation Administration (FAA) facility in Chicago, Illinois (2014). Provide insight into the following: What went wrong? What went right? Would a risk assessment strategy if employed miti ...

Question as we have seen traditional and agile schedule

Question : As we have seen, traditional and Agile schedule developments are quite different. Agile project management was originally developed to do software development. Could a traditional process be successfully used ...

Explain that the biggest problems with adware is that it

Explain that the biggest problems with adware is that it slows down the computers its running on.

1nbsphillary wants to go to disneyland in 425 years she

1) Hillary wants to go to Disneyland in 4.25 years. She wants to take her partner and 2 kids (4 people in Total). If it is going to cost $453.27 per person to go on the trip. -What will the cost be for the entire trip? - ...

Youve entered a contract to purchase a new house and the

You've entered a contract to purchase a new house, and the closing is scheduled for next week. It's typical for some last-minute bargaining to occur at the closing table, where sellers often try to tack on extra fees. Yo ...

What is equi-marginal principle why does it have to be true

What is Equi-marginal principle? Why does it have to be true at interior optimum?

Dud bolt is preparing for the boonta eve classic speeder

Dud Bolt is preparing for the Boonta Eve Classic speeder race and has to make a decision about which racer to bet on. He has calculated his potential payoffs and narrowed it down to two racers shown in the following tabl ...

For the rosenberg land development problem problem 2 in

For the Rosenberg Land Development problem (Problem 2 in Chapter 14), suppose that the construction costs are uncertain. Specifically, assume that the distribution ofconstruction costs is normally distributed, with the m ...

  • 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