title: printing max of each array in an array of arrays in a for loop
body: <p>My code should print to top score entered for each student, but instead for each student it reprints the top score of all the students.</p>
  
  <p>Can anyone explain why? What's the error...even working it out on paper I don't see it.</p>
  
  <pre><code>//Take integer marks (0-100) of 3 tests of 4 students and print the highest score of respective student
  
  #include&lt;stdio.h&gt;
  
  int main (void)
  {
      int i=0, j=0, a=0, b=0;
      int
          arr[a][b],
          max[i];
  
  
  
  
      printf("Enter the number of students, and number of tests score per student: \n\n");
      scanf("%d", &amp;a);
      scanf("%d", &amp;b);
      //int arr[][] = arr[a][b];
      for(i=0; i&lt;a; i++)
          {
          printf("Enter the scores for student %d \n", (i+1));
              for(j=0; j&lt;b; j++)
              {
              scanf("%d", &amp;arr[i][j]);
              }
          }
  
      for(i=0; i&lt;a; i++)
          {
          max [i] = 0;
          for(j=0; j&lt;b; j++)
              {
              if(arr[i][j]&gt;max[i])
                  {
                  max[i] = arr[i][j];
                  }
              }
          }
  
       for(i=0; i&lt;a; i++)
       {
           printf("The highest score for student %d was:\t %d\n\n", (i+1), max[i]);
       }
  
  }
  </code></pre>