General utilities Page 348
Page 348

UM014423-0607
C Standard Library
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
328
Character Input/Output
General Utilities
The <
stdlib.h
> header declares several types, functions of general utility, and macros.
Types
Macros
Functions
The following sections describe the general utilities functions:
•
“String Conversion” on page 329
•
“Pseudorandom Sequence Generation” on page 329
•
“Memory Management” on page 329
•
“Searching and Sorting Utilities” on page 329
int getchar(void);
Reads a character from stdin.
char *gets(char *s);
Reads a line from stdin.
int putchar(int c);
Writes a character to stdout.
int puts(const char *s);
Writes a line to stdout.
div_t
Structure type that is the type of the value returned by the div function.
ldiv_t
Structure type that is the type of the value returned by the ldiv function.
size_t
Unsigned integral type of the result of the sizeof operator.
wchar_t
Integral type whose range of values can represent distinct codes for all members
of the largest extended character set specified among the supported locales.
EDOM
Expands to distinct nonzero integral constant expressions.
ERANGE
Expands to distinct nonzero integral constant expressions.
EXIT_SUCCESS Expands to integral expression which indicates successful termination status.
EXIT_FAILURE
Expands to integral expression which indicates unsuccessful termination
status.
HUGE_VAL
Expands to a positive double expression, not necessarily represented as a
float.
NULL
Expands to a null pointer constant.
RAND_MAX
Expands to an integral constant expression, the value of which is the
maximum value returned by the rand function.