### C Library Functions: Low-Level Input/Output

Port Input/Output

Function | Header File | Description
_inp | conio.h builtin.h | Reads a byte value from a specified input port.
_inpd | conio.h builtin.h | Reads a 4-byte value from a specified input port.
_inpw | conio.h builtin.h | Reads a 2-byte value from a specified input port.
_outp | conio.h builtin.h | Writes a byte value to a specified output port.
_outpd | conio.h builtin.h | Writes a 4-byte value to a specified output port.
_outpw | conio.h builtin.h | Writes a 2-byte value to a specified output port.
umask | io.h | Sets the file permission mask of the executing process environment.

Character and String Input/Output

Function | Header File | Description
_cgets | conio.h | Reads a string from the keyboard into locations given by arguments.
_cprintf | conio.h | Formats and sends a series of characters and values to the screen.
_cputs | conio.h | Writes a string directly to the screen.
_cscanf | conio.h | Reads data from the keyboard into locations given by arguments.
_getch | conio.h | Reads a single character from the keyboard.
_getche | conio.h | Reads a single character from the keyboard and displays it.
_kbhit | conio.h | Tests if a key has been pressed on the keyboard.
_putch | conio.h | Writes a character to the screen.
_ungetch | conio.h | Pushes a character back to the keyboard.

Direct Input/Output

Function | Header File | Description
read | io.h | Reads bytes from a file into a buffer.
write | io.h | Writes bytes from a buffer into a file.

File Positioning

Function | Header File | Description
__eof | io.h | Determines whether the file pointer has reached the end of the file.
_tell | io.h | Gets the current position of a file pointer.

File Access

Function | Header File | Description
access | io.h | Determines whether the given file exists and whether you can gain access to it.
chmod | io.h | Changes the permission setting of a file.
close | io.h | Closes a file associated with the handle.
creat | io.h | Creates a new file or opens and truncates an existing file.
dup | io.h | Associates a second file handle with an open file.
dup2 | io.h | Associates a second file handle, with possibly different attributes, with an open file.
isatty | io.h | Determines whether the handle is associated with a character device.
open | io.h | Opens a file and prepares it for subsequent reading and writing.
_sopen | io.h | Opens a file and prepares it for subsequent shared reading or writing.

File Operations

Function | Header File | Description
_chsize | io.h | Lengthens or cuts off the file to a specified length.
_filelength | io.h | Returns the length of a file.

Alphabetical Listing of IBM C and C++ Compilers Functions and Macros