C Library Function

  • C library functions, also known as C standard library functions, are built-in functions in C programming.
  • These functions’ prototypes and data definitions can be found in their respective header files.
  • We must include the header file in our program in order to use these functions.
  • For example, if you want to use the printf() function, you must include the header file <stdio.h>.

String Function

  • strcpy
  • strncpy
  • strcat
  • strncat
  • strchr

Mathematical Function

  • acos
  • asin
  • atan
  • ceil
  • cos

Date & Time Function

  • clock
  • difftime
  • mktime
  • time
  • asctime

I/O Formatting Functions

  • printf
  • scanf
  • getc
  • getchar
  • gets

Miscellaneous Functions

  • delay
  • clrscr
  • clearer
  • isalpha
  • isalnum
  • isdigit
  • islower

Standard Library functions

  • abs
  • atof
  • atol
  • exit
  • free
  • labs
  • rand

Memory Allocation Functions

  • malloc
  • realloc
  • calloc

Summary of Header Files

Header fileFull NameExplanation
<stdio.h>Standard input-output headerUsed to perform input and output operations like scanf() and printf()
<string.h>String headerUsed to perform string manipulation operations like strlen and strcpy.
<conio.h>Console input-output headerUsed to perform console input and console output operations like clrscr() to clear the screen and getch() to get the character from the keyboard.
<stdlib.h>Standard library headerUsed to perform standard utility functions like dynamic memory allocation using functions such as malloc() and calloc().
<math.h>Math headerUsed to perform mathematical operations like sqrt() and pow() to obtain the square root and the power of a number respectively.
<ctype.h>Character type headerUsed to perform character type functions like isaplha() and isdigit() to find whether the given character is an alphabet or a digit. respectively.
<time.h>Time headerUsed to perform functions related to date and time like setdate() and getdate() to modify the system date and get the CPU time respectively.
<assert.h>Assertion headerUsed in program assertion functions like assert() to get an integer data type as a parameter which prints stderr only if the parameter passed is 0.
<locale.h>Localization headerUsed to perform localization functions like setlocale() and localeconv() to set locale and get locale conventions respectively.
<signal.h>Signal headerUsed to perform signal handling functions like signal() and raise() to install signal handler and to raise the signal in the program respectively.
<setjmp.h>Jump headerUsed to perform jump functions.
<stdarg.h>Standard argument headerUsed to perform standard argument functions like va_start and va_arg() to indicate the start of the variable-length argument list and to fetch the arguments from the variable-length argument list in the program respectively.
<errno.h>Error handling headerUsed to perform error handling operations like errno() to indicate errors in the program by initially assigning the value of this function to 0 and then later changing it to indicate errors.
%d bloggers like this: