Pointer Variables

Chapter 11 - Complete I/O in C

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Low-level Input and Output in C
Table 11-1 lists the most commonly used low-level input and output functions used by an application.
Table 11-1: Commonly Used Low-level Input and Output Functions
Function
Definition
close( )
Closes a disk file
lseek( )
Seeks to the specified byte in a file
open( )
Opens a disk file
read( )
Reads a buffer of data
unlink( )
Removes a file from the directory
write( )
Writes a buffer of data
Low-level input and output calls do not buffer or format data. Files opened by low-level calls are referenced by a file handle (an integer value used by the operating system to refer to the file). You use the open( ) function to open files. You can use the sopen( ) macro to open a file with file-sharing attributes.
Low-level functions are different from their stream counterparts because they do not require the inclusion of the STDIO.H header file. However, some common constants that are predefined in STDIO.H, such as EOF and NULL, may be useful. Declarations for the low-level functions are given in the IO.H header file.
This second disk-file I/O system was originally created under the UNIX operating system. Because the ANSI C standard committee has elected not to standardize this low-level, UNIX-like, unbuffered I/O system, it cannot be recommended for future use. Instead, the standardized buffered I/O system described throughout this chapter is recommended for all new projects.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net