If it finds one, it updates indexOfLargest:
for (int n = SIZE-1; n > 0; n--) {
indexOfLargest = 0;
for (int i = 1; i <= n; i++) {
if ( v[i] > v[indexOfLargest] ) {
indexOfLargest = i;
}
}
temp = v[n]; // swap the highest position of the unsorted
v[n] = v[indexOfLargest]; // part with the largest element
v[indexOfLargest] = temp;
}