Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 age

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Have issues been prioritized?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago