Problem

Indirect Sorting Through Pointers #2 Write a program that solves the problem of P...

Indirect Sorting Through Pointers #2

Write a program that solves the problem of Programming Challenge 3, except that the array of pointer points to the data array in descending order of age.

REF:

Indirect Sorting Through Pointers #1

Consider a company that needs to sort an array Person data[10] of structures of type

Person by name.

In real life the Person structures may have many members and occupy a large area of memory, making it computationally expensive to move Person objects around while sorting. You can define an auxiliary array Person *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 Person objects in ascending alphabetic order of names.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT