The C++ code that would draw all the iterations in the selection sort process on the array is given below:
<h3>C++ Code</h3>
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, temp1, temp2;
int string2[16] = { 0, 4, 2, 5, 1, 5, 6, 2, 6, 89, 21, 32, 31, 5, 32, 12 };
_Bool check = 1;
while (check) {
temp1 = string2[i];
temp2 = string2[i + 1];
if (temp1 < temp2) {
string2[i + 1] = temp1;
string2[i] = temp2;
i = 0;
} else {
i++;
if (i = 15) {
check = !check;
}
}
}
return 0;
}
Read more about C++ programming here:
brainly.com/question/20339175
#SPJ1