title: Trying to create a 2d array by inserting characters retrieved from file stream
body: <p>This is my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #define ROW 10
  #define COLUMN 20
  int main(int argc, char *argv[]){
    FILE* fptr;
    char grid[ROW][COLUMN];
    int i ,j;
    fptr = fopen(argv[1],"r");
    for ( i = 0; i &lt; ROW; i++){
      for ( j = 0; j&lt; COLUMN; j++){
  
       fscanf(fptr,"%c",&amp;grid[i][j]);
      }
  
  
    }
    for(i = 0; i&lt; ROW; i++){
      for(j = 0; j&lt; COLUMN; j++){
        printf("%c",grid[i][j]);
      }
    }
  
  
  
    return(0);
  }
  </code></pre>
  
  <p>This is my input file:</p>
  
  <pre><code>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
  0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  </code></pre>
  
  <p>This is my output:</p>
  
  <pre><code>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
  0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
  </code></pre>
  
  <p>but it should look like the input file itself. I don't know what I did wrong as I feel very incompetent and I need it for an assignment. Thing is the input file needs to be stored as a 2d array because later on the element of the array will be used to compare for creating COnways game of life.</p>