The following function is written to sort n integers given in array a in ascending order. There are errors in this code. Fix them.
void MySort(int *a, int n){
for(int i=0; i for(int j=0; j if (a[i] < a[j]){
a[j] = a[i];
a[i] = a[j]; }
} }
}