Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using mySort(int [], int size) create a selection sort function to sort an integer array and use myDisplay(int A[], int size) to create a display

Using mySort(int [], int size) create a selection sort function to sort an integer array and use myDisplay(int A[], int size) to create a display function to display the integer array.

image text in transcribed

\#include using namespace std; //Function declarations/Prototypes void mySort(int A[], int size); //To sort an integer array oid myDisplay(int A[], int size); //To display an integer array [//0ther functions if there is any -int main() \{ // 1. Prepare an array of integers for sorting int A[]={6,5,2,89,3,2,1,1,15,21,17,63,59,35}; int size =14;// Size of the array A[] //A=[4,3,5,2,1,1] l/int size =6 // 2. Display the array before sorting cout "Before sorting: " endl; myDisplay( A, size); I/ 3. Sort the array mySort(A, size ); // 4. Display the array after sorting cout "After sorting: " endl; myDisplay ( A, size); return 0; ///////// Function implementations //////////////// //Goal: To sort an array of integers //Input: A[] - An array of integers // size - the size of A[] //Output: None //Procedure: Gvoid mySort(int A[], int size) \{ I/cout "sorted" endl; G//Goal: To display an array of integers //Input: A[] - An array of integers // size - the size of A[] //Output: None / /Procedure: Gvoid myDisplay(int A[], int size) \{ I/cout "displayed" end

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

Step: 3

blur-text-image

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions