We will start by defining a macro, max, of value 20. You can always increase the value of max as required. Then, we will define an array, arr, of size max, that is, of size 20. You will be asked how many values you want to sort. Assuming that you want to sort seven elements, the value you entered will be assigned to the len variable. You will be prompted to enter the values to be sorted, which will then be assigned to the arr array. The seven values to be sorted in the arr array might appear as follows:
Now, we will run two nested for loops: the outer for loop will execute from len-2, that is, from value 5 to 1 in ...