/***************************************************************************
 *  Columbia University Introduction to Computer Programming in C COMS 1003
 *  Echo an input file of scores char by char to the stdout
 *
 *  Copyright (C) 2005 Michael E. Locasto
 *
 *  All rights reserved.
 *
 * $Id: printscores-first.c,v 1.1 2005/10/25 15:09:15 locasto Exp $
 **************************************************************************/

#include <stdio.h>

/**
 * This program prints out each character of stdin to stdout
 *
 * 
 */
int main(int argc, char* argv[])
{
   int c = 0;
   int x = 0;
   
   while(EOF!=(c=getchar()))
   {
      /* Echo input to output */
      x = putchar(c);
      
      if(EOF==x)
      {
         printf("\n--- OUTPUT ERROR ---\n");
      }
      
   }
   return 0;
}
