Why do I get a SIGSEGV?

i got error “SIGSEGV” for my code https://www.codechef.com/viewsolution/8172487

Why am I getting SIGSEGV for this solution of the problem ADDMUL

https://www.codechef.com/viewsolution/8210117

It is partially solved, still can someone explain why am i getting SIGSEGV

@devesh23 try to use less memory…
like try to solve the question using long int instead if long long int!!

why am i getting SIGSEVG ? https://www.codechef.com/viewsolution/8450343

awesome question.

why iam getting SIGSEVG ? This code is running successfully on the IDE.
https://www.codechef.com/viewsolution/8704219

plz help

Please check this https://www.codechef.com/viewsolution/8836252 , I’ve tried running it through codechef IDE and Codeblocks and it works fine. When I submitted what I get is a runtime error SIGSEGV. Thanks.

aUtama[10] aCari[10]
You are declaring maximum size as 10. However constraint on maximum size is sadly not specified. Set it to 10000 as that worked in many accepted solutions.

I got SIGSEVG error when my code compiled.In my code, I declared a 2D array of size N,and according to the constrains given in the problem ,N can be any integer upto 10^5,How do i overcome this ??
Please help me out.

why do i get SIGSEVG ERROR please check this link https://www.codechef.com/viewsolution/8967541

Why am I getting runtime error (SIGSEGV) I dont understand?
https://www.codechef.com/viewsolution/9036347.
Please help me anyone.

why am i getting SIGSEVG ? https://www.codechef.com/viewsolution/9086051 Please help me anyone as soon as possible.

use static memory allocation ,not dynamic (y) this causes SIGSEVG error sometimes

3 Likes

Most of the questions in codechef have plenty of memory if you allocate it properly to the arrays. So, use it freely to declare large arrays. If you need more memory than needed, maybe you’re taking the wrong approach. So, avoid using sigsegv and use plenty of memory.

Please upvote if this helped you.

#include<stdio.h>
int main()
{
int t,n,v[10],i,j=0,big=0;
static int c[10];
scanf("%d",&t);
while(t–)
{
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&v[i]);
++c[v[i]];
}
big=0;
for(i=1;i<=n;i++)
{
if(c[i]>big)
{
big=c[i];
j=i;
}
c[i]=0;
}
printf("%d %d\n",j,big);

}
return 0;
}

HELP ME OUT FOR THIS RUN TIME ERROR SIGSEVG…HIGHLY IMPORTANT
PLSS
LINK: https://www.codechef.com/viewsolution/9410079

PLS PLS HELP ME OUT…

i am getting an error please help me. My code is correct i checked it with codechef compiler also - https://www.codechef.com/viewsolution/9763053

What if we need to put an array of 100000 ints inside a function ?
Rest everything is correct.But i m still getting SIGSEGV error:(

Somebody please help me with this… https://www.codechef.com/viewsolution/9917255

please help , why do i get RUNTIME ERROR (SIGSEGV)
https://www.codechef.com/viewsolution/9965435