Define Character Input and Output with Files?
This is done by using equivalents of putchar and getchar which are called putc and getc. Each one takes an extra argument which identifies the file pointer to be meant to use for input or output.
putchar(c) is equivalent to putc(c,stdout)
getchar(c) is equivalent to getc(stdin)