please explain how to get the correct answers define size 8 int sort int int int mai 5152035
Please explain how to get the correct answers.
#define SIZE 8 int sort(int[], int); int main() int x[SIZE] = {7, 5, 3, 1, 8, 6, 4, 2); int i; int index; fo” aria-describedby=”d9o”> include #define SIZE 8 int sort(int[], int); int main() int x[SIZE] = {7, 5, 3, 1, 8, 6, 4, 2); int i; int index; for (i = 1; i < SIZE; i++) index – sort(x, SIZE – i – 1); if(i == 1 || i == SIZE – 1) printf(“i: $d index: %dn”, i, index); return(0); -nt sort(int x[], int i) int temp; while(i < SIZE – 1 && x[i] > x[i + 1]) temp – x[i]; x[i] – x[i + 1]; x[i + 1] = temp; i += 1; return(i); 16. Which of the following sorting algorithms has been implemented in the program above? A) Selection Sort C) Insertion Sort B) Bubble Sort DJ None of the above. 17. Which of the following is the first line of output generated by the program above? A) i: 1 index: 6 C) i: 1 index: 8 B) i: 1 index: 7 D) None of the above. 18. Which of the following is the second line of output generated by the program above? A) i: 7 index: 6 C) i: 7 index: 8 B) i: 7 index: 7 D) None of the above.