C header file

Headers

Each function in the C standard library has its associated header. The headers are included using #include. Header Including obtains the Declarations for the standard library functions.

Header list

The following table has the common headers.

Header Purpose
assert.h assert() macro
ctype.h Character handling
errno.h Error reporting
float.h implementation-dependent floating-point limits
limits.h dependent limits
locale.h Localization
math.h Math library
setjmp.h Nonlocal jumps
signal.h Signal handling
stdarg.h Variable argument lists
stddef.h Constants
stdio.h I/O system
stdlib.h Miscellaneous declarations
string.h string functions
time.h system time functions
complex.h complex arithmetic.
fenv.h Gives access to the floating-point status flags and other aspects of the floating-point environment.
inttypes.h A standard, portable integer type names.
iso646.h Defines macros that correspond to various operators, such as && and ^.
stdbool.h Supports Boolean data types. Defines the macro bool, which helps with C++ compatibility.
stdint.h Defines a standard, portable set of integer type names. This file is included by inttypes.h.
tgmath.h Defines type-generic floating-point macros.
wchar.h multibyte and wide-character functions.
wctype.h multibyte and wide-character classification functions.

Example

Use header file to include functions


#include <stdio.h>
//from  w  w  w .  ja  v  a2s  .c o m
int main(void)
{
  printf("\nBe careful!!\a");
  return 0;
}

The code above generates the following result.





















Home »
  C Language »
    Language Basics »




C Language Basics
Data Types
Operator
Statement
Array