Compilation issues

my code runs fine on other ides but gives segmentation fault here, why it is so?

hi @paidaarpit1505_f9664148aad841e0,

it is due to the size of array when u make such big array you need to make it on heap part ( which can be done if made globally )

commented and updated https://ide.codingblocks.com/s/662928

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.