Confusion in function call

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

bubblesort(arr) updated the values of our array arr. so when we call print …the updated values get printed