Help me correct the logical error
I was trying different insertion operations In the code attached below, I have a problem in the insorder function, Size of array 5 My sample input: 88 56 4 2 5 Choice is 3 Element to add : 106 Output: 106 2 4 5 56 88 In actual output we expect 106 to be added at the last position but here it gets inserted as the first position. If I choose choice 3 in the second program iteration the code works fine. I don't understand why. Please help, sorry for the long code and the inconvenience with the infinite loop. SUMMARY: the element is not getting inserted at the end of the array instead gets added in the beginning. NOTE: Since I have added an infinite loop please try the code in some other compiler. https://sololearn.com/compiler-playground/c6lIrrdd2aDJ/?ref=app