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

  What is the output of code fragment that invokes calc

What is output of code fragment that invokes calc

  Determining the priority of period of execution of irqj

Determining the priority of period of execution of IRQJ

  Is it right that rbac functionality is complicated

Is it right that RBAC functionality is complicated

  What is oracle administration documentations

What is oracle administration documentations

  How to write basic structure of an exception handler

How to write basic structure of an Exception handler a. generate an abstract class Furniture b. Declare an abstract process Discount the returns no value but accepts the cost of item

  What is a backup strategy or active directory?

What is a backup strategy or Active Directory? The small business that you created new domain controllers for now wants you to develop a backup and recovery plan for Active Directory.

  Write c program ''myls'' that functions like unix command ''ls''

Write C program 'myls' that functions like unix command 'ls'.

  How can a relation be organized in mass storage

How can a relation be organized in mass storage.

  What variety of cable will work to make an association

What variety of cable will work to make an association

  Describe how left explanation is useful while formatting

Describe how left explanation is useful while formatting

  How to illustrate decision table to represent treatment

How to illustrate decision table to represent treatment? Create a structured English version based on the following dialogue obtained by the Systems Analyst from the client interview below.

  Mathematics in computing

Write the selection sort algorithm

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