Need Program Sort Array Pointers Instead Works Need Know Swap Pointers Include Define Maxs Q37191945

I need this program to sort an array but with pointers instead.It works as is I just need to know what to swap out forpointers.

#include<stdio.h>
#define MAXSIZE 10

int readElements(int arr[]);      //Function Prototype

void printElements(const int arr[], const int n);      //Function Prototype

void selectionSort(int arr[], int n);      //Function Prototype

void swap(int arr[], int i, int j);          //Function Prototype

int main()
{
int arr[MAXSIZE];        //this declaresthe array
printf(“Enter the elemnts of the array and then enter EOFn”);
int n = readElements(arr);        //readsin inputs for the array
printf(“nBefore Sorting: n”);
printElements(arr, n);    //prints original array
selectionSort(arr, n);   //sorts the array
printf(“After Sorting: n”);
printElements(arr, n);   //prints the sorted array
return 0;
}

int readElements(int

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.