The Standard C Library
As we have said, one of the reasons C is a popular language is
that it is a "high level" "low level" language. It provides
high level programming constructs such as functions, loop, and test
which make it easy to write modular, well structured code.
At the same time, it provides low level operators and freedom
to allow a programer to create their own tools for manipulating
their data.
Up until now, we have largely written our own tools when we needed
them (e.g.
chrutil.h).
However, the standard C library provides a large number of
built-in utility functions and macros we can use instead of
writing our own.
The full standard C library is documented in
Appendix C
of the textbook.
The functions provided fall into several categories:
Character Class Tests
String Functions
Utility Functions
- including
system().
Math Functions
- NOTE: to use the math library, you must include <math.h>
AND link the math library on the cc line:
cc whatever.c -o whatever -lm
File I/O Functions
Limit Macros
Others
A full
alphabetic listing
of the C library is also found in the Appendix.
C library functions are also documented on Unix
man pages.
to Overview.