Question in which we have to print asci values

please tell me what is segmentation fault and how to avoid it. I am getting segmentation fault whenever I submit my code but on my compiler its running perfectly, please checkhttps://ide.codingblocks.com/s/243714

@Vansh1410
You get a seg fault when you access a memory which you didn’t have access to.
for example, you declare int a[10]; and you try to access a[20] . this will give you a seg fault.

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.