Wrong answer for test cases

My code link - https://ide.codingblocks.com/s/211493
My code shows wrong answer for the first four test cases.

@lalchetna03
In case element is not present in array it returns index of first element greater than the number not n as you’ve assumed
If your doubt is resolved please mark it as closed

Ohh, right. Thanks for your help.

@lalchetna03
If your doubt is resolved please close it