#include <stdio.h>

main (argc,argv)
int argc;
char *argv[];
{
  FILE *f1, *f2, *fopen();
  int n, c;
 
  if (argc != 3) {
     printf("\nUsage: cp from ... to ...");
     exit(1);
  }
  if ( (f1=fopen(argv[1],"r") ) == NULL ) {
     printf("\ncopy: can't open %s\n",argv[1]);
     exit(1);
  }
 
 
  if ( (f2=fopen(argv[2],"w") ) == NULL ) {
     printf("\ncopy: can't create %s\n",argv[2]);
     exit(1);
  }

  while ( (c=getc(f1)) != EOF )
     putc(c,f2);
     exit(0);
 }
