Run-error is occurred in code

Most of the time run-error is occurred in program thoigh it runs successfully in other compilers(devcpp).
What is the main reason for this and how can this be resolved?

@Mudit809 hey mudit their is no extact reason for the run error basically the run error is due to fact when a code will not able to meets it 's requirement to run itself link constraints given in the question is like 10^9 but you giving the size less than the given size so may be your program was running perfectly fine for the smaller input but it start to break over large input that condition arises a case of run error or there is so many problem that can arise a problem of run time error refer to this quora link runtime error.