C/C++ Library Functions (cont’d)
Chapter 1
22
Headers Description Functions
cstdlib
contains various functions related to conversion
between text and numbers, random numbers,
and other utility functions.
abs(x), atof(const char* str), atoi(const
char* str), atol(const char* str),
atoll(const char* str) etc.
ctime
Containsfunction prototypes related to date
and time manipulations in C++.
localtime(), clock(), difftime() etc.
cctype
Containfunction prototypes that test the type of
characters (digit, alphabet, etc.). It also has
prototypes that are used to convert between
uppercase andlowercase
toupper(ch), tolower(ch), isalpha(ch),
isalnum(ch), isupper(ch), isdigit(ch),
islower()
cstring
Thisheader fileincludes function prototypes for
C/C++-style string-processing functions.
strcpy(), strcat(), strcmp() etc.
fstream
Function as prototypes for functions that
perform input/output from/to files on disk are
included in fstreamheader.
open(), close(), put(), read(), write()
etc.
climits
Thisheader file has the integral size limits of the
system.
CHAR_MIN, CHAR_MAX, INT_MIN,
INT_MAX, UINT_MAX, LONG_MIN
LONG_MAX
cfloat
This header file contains the size limits for
floating-point numbers on the system.
FLT_DIG, DBL_DIG, LDBL_DIG,
FLT_MANT_DIG, DBL_MANT_DIG,
LDBL_MANT_DIG