title: Code in online compiler shows segmentation fault program finished with exit code 139
body: <p>I am trying to write code in online compiler but it shows segmentation fault program finished with exit code 139</p>
  <p><em>this is the code i have been working on</em></p>
  <pre><code>#include&lt;stdio.h&gt;
  
  void main(){
      int arrayLength ,array[20] ,sum , array_sum=0 ,j;
      printf(&quot;enter the no of elements in your array&quot;);
      scanf(&quot;%d&quot; , &amp;arrayLength);
      printf(&quot;enter your array&quot;);
      for (int i=0 ; i&lt;arrayLength; i++){
          scanf(&quot;%d&quot;, &amp;array[i]);
      }
      printf(&quot;your array is&quot;);
      for (int i=0; i &lt; arrayLength; i++){
          printf(&quot;%d&quot;,array[i]);
      }
      printf(&quot;enter the sum&quot;);
      scanf(&quot;%d&quot; ,&amp;sum);
      for (int i = 0; i &lt; arrayLength; i++) {
          if(array_sum&lt;sum){
              array_sum=array_sum+array[i];
              continue;
          }
          else if(array_sum&gt;sum &amp;&amp; i&lt;arrayLength){
              array_sum = array_sum - array[j];
              continue;
              
          }
          else if ( array_sum=sum){
              printf(&quot;your sum can be found between array elements %d and %d &quot;, j ,i);
              continue;
          }
          else{
              printf(&quot;not in this array&quot;);
              
          }
      }
      
  }
  </code></pre>