title: C: Filling a matrix
body: <p>I'm trying to fill a matrix with a for loop, however I'm coming up with a problem where any two coordinates x_0 and y_0 are interchangeable. To emphasize the problem I've simplified it down to the most basic example:</p>
  
  <p>I'm filling the following 2x2 matrix and having it print the value at 1,2 (Or [0][1] within the array):</p>
  
  <pre><code>int matrix[1][1];
  
   for(j=0; j&lt;2; j++){
     for(i=0; i&lt;2; ++i){
          scanf("%d", &amp;matrix[j][i]);
     }
  }
  
  printf("%d \n", matrix[0][1]);
  </code></pre>
  
  <p>However it always returns the value which is entered third, or [1][0]. I originally thought I might have messed up my for loop, but printing matrix[1][0] returns the same (although here appropriate value).</p>
  
  <p>Thank you for any help</p>
  
  <p>Edit: Added declaration. </p>