Modules (Libraries)


    

Table of Contents

  1. Definition
  2. Examples

Definition

C Standard library functions or C Library functions are inbuilt functions in C programming that will help us access functions. The prototype and the definitions of the functions are stored in their respective header files. Therefore, to access an inbuilt function in C, you need to include the header file in your C file.

One example is the printf() function that is accessible because we include the header file library stdio.h on top of our program.

Examples

These are some examples of the C Library header files and link to its documentation.

C Header File Description Some Function Examples
<assert.h> Program assertion functions assert()
<ctype.h> Character type functions isalnum(), isdigit(), tolower()
<locale.h> Localization functions setlocale()
<math.h> Mathematics functions log(), sqrt(), sin(), cos()
<setjmp.h> Jump functions setjmp(), longjmp()
<signal.h> Signal handling functions signal(), raise()
<stdarg.h> Variable arguments handling functions va_start(), va_arg()
<stdio.h> Standard Input/Output functions scanf(), printf(), getchar()
<stdlib.h> Standard Utility functions abort(), exit()
<string.h> String handling functions strcpy(), strcat(), strncat()
<time.h> Date time functions difftime(), time(), clock()