/* * cat.c * * Read several file names from the command line. * Concatenate these files and print the result to the standard output. */ #include // Copy the content of one file to another; assume that the files are open. // Return the number of characters copied int filecopy(FILE *in, FILE *out) { int c, nc; nc = 0; while ( (c=getc(in)) != EOF ) { putc(c, out); nc++; } return nc; } int main(int argc, char *argv[]) { int i, total_char = 0; FILE *in; for (i=1; i