Some of the subroutines use standard input and standard output as their input and output channels. For most of the subroutines, however, you can specify a different file for the source or destination of the data transfer. In many cases, the library contains a macro and a function that do the same type of operation. Macros are usually faster than their equivalent functions because the preprocessor replaces the macros with actual lines of code in the program. Macros result in larger object code after being compiled.
Functions can have side effects to avoid.
Terminal Formatted output and buffering. The open and creat subroutines set up entries in three system tables. A file descriptor indexes the first table, which functions as a per process data area that can be accessed by read and write subroutines. Each entry in this table has a pointer to a corresponding entry in the second table. The second table is a per-system data base, or file table, that allows an open file to be shared among several processes.