title: Trying to access array element in loop causes segmentation fault, why?
body: <p>I am trying to create a two dimensional array, which has either 1 or 0 randomly assigned to each coordinate. It works just fine until it gets to the coordinates [20][3]. After that it just throws out "segmentation fault 11". </p>
  
  <p>I am absolutely clueless how or why. Especially since I can create a matrix with 200 * 200 for instance but it still gets the same Problem only at the coordinates [200][3]. So it is somehow always the third y coordinate in the last x coordinate where the error occurs.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main() {
  
    int x, y, i, j ;
    x = 20;
    y = 20;
  
    int grid [x][y];
  
    for ( i = 0; i &lt;= x; i++) {
      for ( j = 0; j &lt;= y; j++) {
  
        grid[i][j] = rand() % 2 ;
  
        printf("grid [%d][%d]: %d\n", i, j, grid[i][j]);
  
      }
    }
    return 0;
  }
  </code></pre>