Description
Complete the given program (sort_given.cpp) that will ask for a string and sort the string according to its ASCII value using Bubble Sort.
Write the bubble sort function. The function should print the characters in sorted ascending order according to ASCII value.
Sample Output:
Enter a string of characters: What’s Up!!!
#################################################
Array before changing to ASCII values: What’s Up!!!
ASCII Array before Sorting: 87 104 97 116 39 115 32 85 112 33 33 33
ASCII Array after Sorting: 32 33 33 33 39 85 87 97 104 112 115 116
The sorted string is = !!!’UWahpst
#################################################