Add Book to My BookshelfPurchase This Book Online

Chapter 4 - The Standard I/O Library

UNIX Systems Programming for SVR4
David A. Curry
 Copyright © 1996 O'Reilly & Associates, Inc.

Data Types and Constants
When using the Standard I/O Library functions, an open file with its associated buffers is called a stream and is referenced by a file pointer. A file pointer is a variable of type FILE *, as defined in the include file stdio.h. There are three predefined file pointers associated with the three open files given to each process when it is invoked: stdin refers to the standard input file (usually the keyboard), stdout refers to the standard output file (usually the screen), and stderr refers to the standard error file (also usually the screen).
The Standard I/O Library functions also make use of three constants defined in the include file stdio.h:
EOF
Returned by most of the integer-valued functions upon encountering an end-of-file condition.
NULL
Returned by most of the pointer-valued functions, signifying a null pointer.
BUFSIZ
The size of buffers that should be used with most of the routines. Other buffer sizes may be used with some functions, but this constant serves as a useful value for declaring character arrays and other variables.

Previous SectionNext Section
Books24x7.com, Inc © 2000 –  Feedback