I submitted the following code :
include
int main(void) {
int a[5],i=0,j=0;
a[i]=0;
for(i=0;i<5;i++)
{
scanf("%d",&a[i]);
}
while(a[j]!=42)
{
printf("%d\n",a[j]);
j++;
}
return 0;
}
as the solution to the problem: Life, the Universe, and Everything using GCC 6.3 compiler but it tells me - runtime error (SIGSEGV). This is my first time in SPOJ (and with competitive coding in general), so please go easy on me