/* * Program to get one line of text from stdin and echo (using recursion). */ #include void echo(void); int main(void) { printf("enter a line of of text\n"); echo(); return 0; } /* * read characters from stdin until end of line and echo */ void echo(void) { int input = getchar(); if ((input == EOF) || (input == '\n')) { putchar('\n'); } else { putchar(input); echo(); } }