Can't find why getting ans-1 in CB ide

can’t find why getting ans-1 in CB ide
i tried the same code in gfg ide and got the correct ans
https://ide.codingblocks.com/s/152311

Hi divyam
Yes there is some difference in outputs on gfg ide and cb.
I have raised it mentor attention. You will recieve reply shortly.

Hope it helps.