title: Why is my program only printing out every other char? C
body: <p>I have created a program to print out a string (ending in '.') in reverse order. The program takes each char and stores it in a linked list in reverse order, then in the main function prints out the linked list. It works, however it prints out every other char. </p>
  
  <pre><code>int main (void)
  {
      printf("Enter text: ");
      char text;
      textE *nexttext = NULL;
      while(getchar() != '\n')
      {
          text = getchar();
          nexttext = insertchar(nexttext, text);
      }
   }
  </code></pre>