title: Receiving a string from user with only scanf and printing it. C language
body: <p>Forgive weird formatting. It's my first post. In the assignment, I have to receive a string from the user using scanf("%c"), store it into an array (for example, string[5]), and print the entered string using scanf("%s). Everything I've tried has resulted in the string not being printed properly or only the first word. Any help is appreciated.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(void)
  {
    char string[81];
    int i = 0;
  
    printf("Please enter a string. ");
    scanf("%c", string);
  
   while (string[i+1] != '\0')
   {
     printf("%s", i);
     i++;
   }
   return 0;
  }
  </code></pre>