Questionwrite down this following program using c language

Assignment Help Computer Engineering
Reference no: EM13348556

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: EM13348556

Questions Cloud

Question 1a what do you understand by maintenance strategyb : question 1a what do you understand by maintenance strategy?b name 4 common strategies and briefly describe themc what
Questionon january 1 2004 james company leased a machine : questionon january 1 2004 james company leased a machine for 10 years that would have been purchased for 100000. the
Questionwrite down a c program sortc that performs a : questionwrite down a c program sort.c that performs a combine sort on two number sequences produced by program in q1.
Question 1a define motivationb how would you use strategies : question 1a define motivation?b how would you use strategies of motivation to motivate your trainees?question 2a what
Questionwrite down this following program using c language : questionwrite down this following program using c language programming.at unknown university admissions department has
Questionforeign currency translation and hedging : questionforeign currency translation and hedging activities.many companies make annual reports available on their
Questionuzi company received a charter granting the right : questionuzi company received a charter granting the right to issue 200000 shares of 1 par value common stock and 10000
Question 1a evaluation of the duration and degree of : question 1a evaluation of the duration and degree of disability after an occupational accident with a single body
Questiontwo parties a and b try to communicate with : questiontwo parties a and b try to communicate with following encryption scheme-both sides agree on same long random

Reviews

Write a Review

Computer Engineering Questions & Answers

  Creating the algorithm

We suppose that we are given a majority graph in order to generate agenda for managing the sequential majority kind of election.

  Create a use case model for using ms powerpoint

Develop and make a Use Case Model for using MS PowerPoint.

  Between an open-source or freeware license distribution

As a business owner you are preparing to release a new software game. What factors must you consider to choose between an open-source or freeware license distribution.

  Capability maturity model (cmm) is in software development

For each level in your model, desribe how toidentify the maturity level and what steps are necessary to move to the next level. For each level, specify needs for relevant quality standards and quality management.

  Four methods to provide data backup

What are the four methods used by the servers in order to provide the data backup, decrease the response time, and decrease the network and the server access time?

  Briefly describe the concept of queues

Briefly describe the concept of queues.

  Write down a unix shell script

For an example, if I want to search for a text file/script that contains the most number of for loop statements, and have it displayed on the screen, How will I do that?

  Example of a business problem solved using a case statement

offer an example of a business problem solved using a case statement. Give an example for a business problem solved with an IF statement. Can IF statements replace SELECT statements, why or why not.

  Implementing program average.java

Write down the program Average.java which just prints the strings that it is provided at the command line, one per line. If nothing is given at the command line, print “No arguments”.

  What is the best way to write down the value ''7564''

What is the best process to write the value '7564' and make it clear to the reader that the number should be interpreted as a hexadecimal value?

  How concepts using the osi model as a framework

Your manager has asked you to describe the frame format of a typical Ethernet packet. Prepare a written report. Be sure to discuss Manchester encoding, 4B/5B encoding, 8B/10B encoding, the cable grades required for different speeds of Ethernet, an..

  Examine this aspect of ajax in relation

AJAX would help the trend of pushing software as a service on the Web! Discuss this aspect of AJAX in relation to the Service Oriented Architecture of Web services.

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