this code is showing segmentation fault again and again in line 4
Winning CB scholorship
Inside the main, you cannot make an integer array of size > 10^5. It will give segmentation fault.
So either decrease the size of array to 10^5. Or declare the array as global outside the main. If the array is declared outside the main then it can have maximum size up 10^7
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.