Standard Functions in C
The standard functions are built-in functions. In C programming language, the standard functions are declared in header files and defined in .dll files. In simple words, the standard functions can be defined as "the ready made functions defined by the system to make coding more easy". The standard functions are also called as library functions or pre-defined functions.
In C when we use standard functions, we must include the respective header file using #include statement. For example, the function printf() is defined in header file stdio.h (Standard Input Output header file). When we use printf() in our program, we must include stdio.h header file using #include<stdio.h> statement.
C Programming Language provides the following header files with standard functions.
Header File | Purpose | Example Functions |
---|---|---|
stdio.h | Provides functions to perform standard I/O operations | printf(), scanf() |
conio.h | Provides functions to perform console I/O operations | clrscr(), getch() |
math.h | Provides functions to perform mathematical operations | sqrt(), pow() |
string.h | Provides functions to handle string data values | strlen(), strcpy() |
stdlib.h | Provides functions to perform general functions/td> | calloc(), malloc() |
time.h | Provides functions to perform operations on time and date | time(), localtime() |
ctype.h | Provides functions to perform - testing and mapping of character data values | isalpha(), islower() |
setjmp.h | Provides functions that are used in function calls | setjump(), longjump() |
signal.h | Provides functions to handle signals during program execution | signal(), raise() |
assert.h | Provides Macro that is used to verify assumptions made by the program | assert() |
locale.h | Defines the location specific settings such as date formats and currency symbols | setlocale() |
stdarg.h | Used to get the arguments in a function if the arguments are not specified by the function | va_start(), va_end(), va_arg() |
errno.h | Provides macros to handle the system calls | Error, errno |
graphics.h | Provides functions to draw graphics. | circle(), rectangle() |
float.h | Provides constants related to floating point data values | |
stddef.h | Defines various variable types | |
limits.h | Defines the maximum and minimum values of various variable types like char, int and long |