/* * 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; for (nc=0; (c = getc(in)) != EOF; nc++) { putc(c, out); } return nc; } int main(int argc, char *argv[]) { int i, total_characters=0; FILE *in; for (i=1 /*skip argv[0]*/; i