title: "SIGSEGV on thread" error
body: <p>I'm getting the error "SIGSEGV on thread". How I can fix it?</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  int n[10], n2[10], num, nun, i=10, j=10, sv=0, on, res[4][20], opc[4][20];
  main(){
      printf("Insert the 1st number: ");
      scanf("%d", &amp;num);
      sv = num;
      while (num != 0)
  {
          n[i] = num%10;
          num = num/10; 
          i--;
  }
      num = sv;
      printf("Insert the 2nd number: ");
      scanf("%d", &amp;nun);
      sv = nun;
      while (nun != 0)
      {
          n2[j] = nun%10;
          nun = nun/10; 
          j--;
      }
      nun = sv;
      printf("Select an operation (1=addition; 2=subtraction; 3=multiplication; 4=division): ");
      scanf("%d", &amp;on);
      while((on&gt;4)||(on&lt;0)){
          printf("Try again: ");
          scanf("%d", &amp;on);
      }
      for (j=1; j&lt;=8; j++){
          for (i=20; i&gt;=1; i--){
              opc[j][i]=0;
          }
      }
      if (on==1)
      {
          for (i=10; i&gt;=1; i++)
          {
              if ((n[i] + n2[i] + opc[1][10+i]) &lt;= 9)
              {
                  opc[1][10+i] += (n[i] + n2[i]);
              }
              if ((n[i] + n2[i] + opc[1][10+i]) &gt; 9)
              {
                  opc[1][10+i] += (n[i] + n2[i])%10;
                  opc[1][9+i] += (n[i] + n2[i])/10;
              }
          }
      }
      else
      {
          printf("Coming soon :)");
      }   
  }
  </code></pre>