Array Insertion sort

whats the error in my code https://ide.codingblocks.com/s/288742

hello @jatinupadhyay786
image

here u need to move arr[j] to j+1 th position.
for that u need to do
swap(arr[j],arr[j+1])

ur code should look like
image

@jatinupadhyay786 Is your doubt resolved ?