Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ code needed i need the solution of number 4 on the picture using the description of number 3. 3. Indirect Sorting Through Pointers #1
c++ code needed
i need the solution of number 4 on the picture using the description of number 3.
3. Indirect Sorting Through Pointers #1 Consider a company that needs to sort an array Person data[10] of structur Person by name. es of type struct Person string name; int age; In real life the Person structures may have many members and occupy a large area ot iemory, making it computationally expensive to move Person objects around while orting. You can define an auxiliary array Person "pData[ 10], setting each entry of oData[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. s( 4)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 ageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started