Please tell about this,

Please tell Why it is showing error, Don’t correct it but please tell me here.

https://ide.codingblocks.com/s/218137 Is It correct now.

Ok then please close the issue.

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.

Sir Still not recieving correct output. Please tell.

You said now it is correct.

I asked you, that is it correct.

No this is not correct. Beacuse you are declaring the array of size 5000000 i.e p2[5000000] = {0}; and this is not possible. Max range of array is 1000000 or some larger to it but not 5000000. So declare the array of lesser size and no segmentaion will come

Please tell about Segmentation Fault. What is that basically?

I had already told you why segmentation fault. It is because you declare the array of size more that 1000000. There is a upper limit on size of array and you are crossing it. So segmentaion fault come.