ERROR IN CODE ON CODINGBLOCKS IDE

The code is providing wrong output on the codingblocks IDE whereas it’s providing correct output on my local system.

hi @pratyushnitdgp19_2c287088d77b5893
Kindly save your code on coding blocks ide and send link…

hi @pratyushnitdgp19_2c287088d77b5893
u have initially made array of size n, just make it of size n+1…
corrected code -->


Its giving the correct o/p now…

1 Like

@pratyushnitdgp19_2c287088d77b5893
I hope it clears ur doubt…

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.