subject

Consider a company that needs to sort an array of structures of type Customer by balance, with the largest balance first. Here is the definition of the Customer structure: struct Customer { string name ; double balance ; } In real life the Customer array may have thousands of data members and occupy a large area of memory, making it computationally expensive to move Customer objects around while sorting . In this problem, you will create an array of only 10 structures, say Customer data[10]. You also can define an auxiliary array Customer *pData[10], setting each entry of pData [k] to point to the corresponding entry of data[k]. Write a program that sorts the array of pointers so that when you go through pData in increasing order of index k, the entries pData[k] point to Customer objects in decreasing order by balance, meaning that pdata[0] now points to the customer with the highest balance, and pData[9] points to the customer with the smallest balance.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
You know the right answer?
Consider a company that needs to sort an array of structures of type Customer by balance, with the l...
Questions
question
Chemistry, 19.08.2019 16:00
question
Mathematics, 19.08.2019 16:00
question
Social Studies, 19.08.2019 16:00
question
History, 19.08.2019 16:00
Questions on the website: 13722361