Write down program using c language programming

Assignment Help Computer Engineering
Reference no: EM132501

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.

 

Reference no: EM132501

Questions Cloud

Define critical path and cpm : Define Critical Path and CPM. Define Networks & Network scheduling
Example on implicit interest and incremental borrowing rate : Example on implicit interest rate and incremental borrowing rate
Program to find smaller between num1 and num2 to output : Program to find smaller between num1 and num2 to output
What is emotional intelligence : What is emotional intelligence. Why is emotional intelligence so important in training.
Write down program using c language programming : Write down program using C language programming.
Evaluate the amount of translation adjustment : Evaluate whether the companys foreign operations have a predominant functional currency
Write general journal entries to record the transactions : Write general journal entries to record the transactions and Write a stockholders' equity section as of the close of business on December 31, 2012.
What is social rehabilitation : What is social rehabilitation How is it different from medical and vocational rehabilitation
Write a program based on encryption scheme : Write a program based on encryption scheme.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write proper sequence in design of a video rental database

Write proper sequence in design of a video rental database

  Determining the priority of period of execution of irqj

Determining the priority of period of execution of IRQJ

  What is meant by user cantered design

What is meant by ‘user cantered design'

  What is mno

What is MNO.

  Software engineering and microprocessor systems

Software is required for a simple house burglar alarm system.

  What is dft of a pure cosine wave cos

What is DFT of a pure cosine wave cos(t) sampled at n equally spaced points on the interval [0, 2π)?

  What security measures required to address vulnerabilities

What security measures required to address vulnerabilities Illustrate threats and vulnerabilities that are possible after implementing "big data" technologies in online auctioning company.

  How to compare and evaluate speeds of dsl and cable modem

How to compare and evaluate speeds of DSL and cable modem Make a diagram of the DSL and Cable Modem connections to your ISP, cable organization, and telecom to your home router using Visio or its open source another software.

  What are three goals of safety in computing?

What are three goals of safety in computing?

  Problem on troubleshooting dns records

Problem on Troubleshooting DNS Records

  What is advantage of payroll scheme approach for the project

What is advantage of payroll scheme approach for the project? What do you think is the most suitable Life Cycle Approach?

  Describe mutual strategy to maintain enterprise-level system

Describe mutual strategy to maintain enterprise-level system

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd