Basic and important In-built functions in C language.

 There are two types of function in c language

  1.    User define function
  2.    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

  1. pow() – return x to the power y (xy
  2. sqrt() – use to get square root of given number
  3. round() – roundup the number
  4. cos() – gives cos value
  5. sin() – gives sin value
  6. tan() – gives tan value
  7. floor() – round the number to next nearest integer

Function present in <stdio.h> header file

  1. printf() – to print on screen
  2. scanf() – use to take input from user
  3. puts() – use to print string
  4. gets() –  take input string from user
  5. getchar() – take input character from user
  6. putchar() – use to print character   

Function present in <string.h> header file

  1. strcat() – marge two string
  2. strrev() – reverse a string
  3. strlen() – give length of stringstrcmp() – compare two string  (case sensitive)
  4. strcpy() – copy a sting
  5. strcmpi() – compare two string (non-case sensitive)
  6. strlwr() – converted into lower case
  7. strupr() – converted into upper case

Function present in <ctype.h> header file

  1. isalpha() – checks whether characters is alphabetic
  2. isdigit() – check whether characters is digit
  3. isalnum() – check whether characters is alphanumeric
  4. isspace() – check whether characters is space
  5. islower() – check whether characters is lower case
  6. isupper() - check whether characters is  upper case
  7. tolower() – check whether characters is alphabetic and converted                    to lower case
  8.  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