C Standard Library: Navigation Search Iso C Headers Library Input/output String Programming Language C
C Standard Library: Navigation Search Iso C Headers Library Input/output String Programming Language C
C Standard Library: Navigation Search Iso C Headers Library Input/output String Programming Language C
The C standard library consists of a set of sections of the ISO C standard which describe a
collection of headers and library routines used to implement common operations, such as
input/output[1] and string handling, in the programming language C. The C standard library is an
interface standard described by a document; it is not an actual library of software routines
available for linkage to C programs. No such implementation is properly called C standard
library.
Note that there is also the term C library, which may refer either to an informal synonym for C
standard library (e.g. "malloc is the name of a function in the C library"), a reference to a
particular implementation which provides the C standard library features and other features
(e.g. "this compiler comes with a very reliable C library for ISO C and POSIX programming"),
or a generic term for a library which has an interface for linking to C programs (e.g. "this
software company offers a C library of fast Fourier transform functions").
The term C runtime library is used on some platforms to refer to a set of base libraries, which
may be distributed in dynamically linkable form with an operating system (with or without
header files), or distributed with a C compiler. Another term sometimes used is libc. Not just any
library is called the run-time library; run time in this context means the run-time support package
associated with a compiler which is understood to make a language complete. The run-time
support provides not only the C standard library functions, but possibly other material needed to
create an environment for the C program, such as initialization before invoking the main
function, or subroutines to provide arithmetic operations missing from the CPU that are needed
by code generated by the C compiler.
C standard library
<assert.h>
<complex.h>
<ctype.h>
<errno.h>
<fenv.h>
<float.h>
<inttypes.h>
<iso646.h>
<limits.h>
<locale.h>
<math.h>
<setjmp.h>
<signal.h>
<stdarg.h>
<stdbool.h>
<stddef.h>
<stdint.h>
<stdio.h>
<stdlib.h>
<string.h>
<tgmath.h>
<time.h>
<wchar.h>
<wctype.h>
v·d·e
Contents
[hide]
1 History
2 ISO Standard
o 2.1 ISO C library headers
3 The C standard library in other languages
4 Compiler built-in functions
5 POSIX standard library
6 Implementations
o 6.1 Detection
7 Criticism, security considerations and safer alternatives
o 7.1 Criticism
o 7.2 Difficulties caused
o 7.3 General paths towards a solution
8 See also
9 References
10 Further Reading
11 External links
[edit] History
The C language, before it was standardized, provided no built-in functions such as I/O
operations, unlike traditional languages such as COBOL and Fortran.[citation needed] Over time, user
communities of C shared ideas and implementations of what is now called C standard libraries to
provide that functionality.[citation needed] Many of these ideas were incorporated eventually into the
definition of the standardized C language.
Both Unix and C were created at AT&T's Bell Laboratories in the late 1960s and early 1970s.
During the 1970s the C language became increasingly popular. Many universities and
organizations began creating their own variants of the language for their own projects. By the
beginning of the 1980s compatibility problems between the various C implementations became
apparent. In 1983 the American National Standards Institute (ANSI) formed a committee to
establish a standard specification of C known as "ANSI C". This work culminated in the creation
of the so-called C89 standard in 1989. Part of the resulting standard was a set of software
libraries called the ANSI C standard library.
Later revisions of the C standard have added several new required header files to the library:
The headers <iso646.h>, <wchar.h>, and <wctype.h> were added with Normative
Addendum 1 (hereafter abbreviated as NA1), an addition to the C Standard ratified in
1995.
The headers <complex.h>, <fenv.h>, <inttypes.h>, <stdbool.h>, <stdint.h>, and
<tgmath.h> were added with C99, a revision to the C Standard published in 1999.