quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryبرمجة وتطوير البرمجيات schoolبكالوريوس event_available2026-07-13

السؤال

Transcribed Image Text:

Problem 1 (68 points): Write a program to sort an array of integers via arrays of pointers to those integers as shown in the figure. The code should contain the following functions: 1) to randomly generate an array of integer numbers; 2) to allocate memory and build the arrays of pointers as shown in the figure (two such arrays are required); 3) to sort one of the arrays of pointers to point to the integer numbers in ascending order (must use recursive selection sort from Homework 4); 4) to sort one of the arrays of pointers to point to the integer numbers in descending order (must use recursive insertion sort from Homework 4); 5) to print the array of integers as shown in the bottom figure. Implement pass by reference and pass by value as appropriate. Ascending Descending Berone SORTING AFTER SORTING Ascending Original 14 26 Descending 57 14 41 33 57 33 41 33 26 57 41 14

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top