title: C Print out a string array
body: <p>I'm very new to programming in C and I'm trying to print an array of strings. I can enter the input easily enough but then when it tries to print the array the program stops responding. Any help is appreciated, thanks.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  void main()
  {
  int a, b;
  char answer[256];
  
  for(a=1; a&lt;=20; a++)
  {
      scanf("%s", &amp;answer[a]);
  }
  
  for(b=1; b&lt;=20; b++)
  {
      printf("%s\n", answer[b]);
  }
  }
  </code></pre>
  
  <p>Update: Thanks for all the fast replies everyone, the program is running smoothly now!</p>