There are two types of function in c language
- User define function
- In-built function it also knows as library function
Here we talk about in-built
function or library function and explain all basic or important header file and
their functions.
In-built function/library
function
Already define function is
known as in-built and we need to just call them in order to use them. There is
many library or in-built function in C language. We know every in-built function
one-by-one
Function present in <math.h>
header file
- pow() – return x to the power y (xy
- sqrt() – use to get square root of given number
- round() – roundup the number
- cos() – gives cos value
- sin() – gives sin value
- tan() – gives tan value
- floor() – round the number to next nearest integer
Function present in <stdio.h>
header file
- printf() – to print on screen
- scanf() – use to take input from user
- puts() – use to print string
- gets() – take input string from user
- getchar() – take input character from user
- putchar() – use to print character
Function present in <string.h>
header file
- strcat() – marge two string
- strrev() – reverse a string
- strlen() – give length of stringstrcmp() – compare two string (case sensitive)
- strcpy() – copy a sting
- strcmpi() – compare two string (non-case sensitive)
- strlwr() – converted into lower case
- strupr() – converted into upper case
Function present in <ctype.h>
header file
- isalpha() – checks whether characters is alphabetic
- isdigit() – check whether characters is digit
- isalnum() – check whether characters is alphanumeric
- isspace() – check whether characters is space
- islower() – check whether characters is lower case
- isupper() - check whether characters is upper case
- tolower() – check whether characters is alphabetic and converted to lower case
- toupper() – check whether characters is alphabetic and converted to upper case
there are many more functions present in all above libraries but here we explain only basic, important and most used libraries.
0 Comments