title: C: Scanning multiple chars and outputting all in a single line
body: <p>I'm trying to make a program that scans multiple chars each time the program loops and then prints all the scanned characters at the end. However, the program only prints the first character scanned each in each loop. Does anyone have any suggestions as how to fix this? Also, I'm just a beginner.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#include &lt;stdio.h&gt;
  
  void f1();
  void f2();
  int i;
  char letters[20];
  
  int main()
  {
   f1();
   printf("%s", letters);
  }
  
  void f1()
  {
   for(i=0; i&lt;5; i++)
   {
    f2();
   }
  }
  
  void f2()
  {
   printf("Enter any 2 letters: ");
   scanf("%s", &amp;letters[i]);
  }</code></pre>
  </div>
  </div>
  </p>