#include <iostream>
using namespace std;
void printarr(int arr[],int n) {
for (int i=0;i<n;i++){
cout<<arr[i]<<" ";
}
}
void selectionSort(int a[], int n) {
int i, j, min, temp;
for (i = 0; i < n - 1; i++) {
min = i; //initial min value
for (j = i + 1; j < n; j++)
if (a[j] < a[min]) // replace curent min value
min = j;
temp = a[i];
a[i] = a[min];
a[min] = temp;
}
}
int main()
{ int allnumber[] = {4,11,76,4,88,3,11};
int arrsize = *(&allnumber + 1) - allnumber; //find array length
selectionSort(allnumber, arrsize);
printarr(allnumber, arrsize);
return 0;
}