Regarding "sort()" function

while sorting an array example {1,2,6,5,4,0}
using sort() function . The solution came out to be 1 2 4 5 6 0 .

why is this 0 not getting sorted ??

please share the code you used to sort the given array

it might be because instead of sort(arr, arr++6) you would have written sort(arr,arr+5)