title: My program.exe has stopped working
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  int main(void){
      int n, i, a[10], sum = 0;
      for(i = 0; i &lt; 10; i++){
          printf("Enter the marks of %dth student ", i + 1);
          scanf("%d", a[i]);
          sum = sum + a[i];
      }
      printf("The total sum is %d", sum);
      return 0;
  }
  </code></pre>
  
  <p>Is there an error in my program?
  Everytime I run the program, after entering the marks for the first student, I get an error saying that my program has stopped working!
  This happens for most of my programs where I have used arrays!</p>