I’m getting rumtime error on codechef ide. But when I compile and run for the same on geeks for geeks ide, linux and other compilers then it is working.
Check out for uninitialized variables, especially if used under array declaration.
Please dont use award point feature dear. It reduces your karma. To give points, you can always use “Accept Answer” , by clicking on tick-in-circle.
sigsegv are generally segmentation fault which occur when you are trying to access invalid memory locations .As vijju123 said , you should check for uninitailsed variables.
You should also check if you are passing an index to array which is greater than the allocated elements .
Also there may be cases with some pointers too .