title: Why can't I list strings stored in arrays?
body: <p>I started learning C recently. I'm having some difficulty with strings, especially in the matter of storing list of names, phrases, words and displaying them later. Here's my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char names[3][10];
  
      printf("Type 3 names: \n");
  
      for (int i = 0; i&lt;3; i++)
      {
          scanf("%10s", names);
      }
  
      printf("\n\nName list:\n\n");
  
      for (int j = 0; j&lt;3; j++)
      {
          for (int k = 0; k&lt;10; k++)
          {
          printf("%s", names[k][j]);
          }
      }
  
      return 0;
  }
  </code></pre>
  
  <p>My intention is to store full names and with spaces and display them listed later.</p>
  
  <p>When I run the code, the program does not ask for 3 names and does not display correctly the ones that have been typed. </p>
  
  <p><a href="https://i.stack.imgur.com/9FIaP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9FIaP.png" alt="error"></a></p>
  
  <p>Any tips on how I can fix it?</p>