Get the next character from stdin: how to use getchar
#include <stdio.h> int main () { char c; puts ("Enter text. '.' to exit:"); do { c=getchar(); putchar (c); } while (c != '.'); return 0; }