in main function after we call bubbleSort(arr) then display(arr) so how will it display in sorted manner…display(arr) means it will only display the starting array
Confusion in function call
bubblesort(arr) updated the values of our array arr. so when we call print …the updated values get printed