title: C - Printing a 2D Char Array
body: <p>How do I print the elements of a 2D Char Array in C?</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>int main()
  {
    unsigned int size;
  
    printf("Enter size:\n");
    scanf("%d",&amp;size);
  
    char word[size][size];
  
    //Enter the matrix
    for(int k = 0; k &lt; (size); ++k){
      for (int j = 0; j &lt; (size); ++j){
        printf("Enter letter:");
        scanf("%c",&amp;word[k][j]);
      }
    }
  
    //printf("\n");
    for (int k = 0; k &lt; size; ++k){
      for(int j = 0; j &lt; size; ++j){
  
        printf("%c",word[k][j]);
      }
      //printf("\n ");
    }
    printf("\n");
  }
  </code></pre>
  
  <p>When executed it returns the element in pairs (using a 4x4 array)
  Example:</p>
  
  <pre><code>ab
  cd
  ef
  gh
  ij
  kl
  mn
  op
  </code></pre>
  
  <p>Rather than my desired output: </p>
  
  <pre><code>abcd
  efgh
  ijkl
  mnop
  </code></pre>
  
  <p>Why is this?</p>