getchar - Read a character from stdin in C

#include <stdio.h>

  int main(void)
  {
    char s[256], *p;

    p = s;
    printf("input char:");
    while((*p++ = getchar())!= '\n');
    *p = '\0'; /* add null terminator */

    printf(s);

    return 0;
  }