/*
 * 	This program echoes characters
 */

#include <stdio.h>
main ()
{
 	 int c;
				/* Instruct and prompt
				 * the user
				 */

	printf ("Enter characters, one at a time it you like, \n");
	printf ("or in strings.  Enter Ctrl-d when you want to stop.\n");

			/* get the first character */

	c = getchar();

			/*
			 *	Test c for terminating character X,
			 *	loop until X is read
			 */

	while (c != EOF)
	  {
		putchar(c);	/* Echo the character */
		c = getchar();	/* Get the next character */
	      }

       }
