Library functions in C language

    • Library functions in C language are inbuilt functions which are grouped together and placed in a common place called library.
    • Each library function in C performs specific operation.
    • We can make use of these library functions to get the pre-defined output instead of writing our own code to get those outputs.
    • These library functions are created by the persons who designed and created C compilers.
    • All C standard library functions are declared in many header files which are saved as file_name.h.
    • Actually, function declaration, definition for macros are given in all header files.
    • We are including these header files in our C program using “#include<file_name.h>” command to make use of the functions those are declared in the header files.
    • When we include header files in our C program using “#include<filename.h>” command, all C code of the header files are included in C program. Then, this C program is compiled by compiler and executed.

List of most used header files in C language:

    • Check the below table to know all the C library functions and header files in which they are declared.
S.No
Header file
Description
1stdio.hThis is standard input/output header file in which Input/Output
functions are declared
2conio.hThis is console input/output header file
3string.hAll string related functions are defined in this header file
4stdlib.hThis header file contains general functions used in C programs
5math.hAll maths related functions are defined in this header file
6time.hThis header file contains time and clock related functions
7ctype.hAll character handling functions are defined in this header file
8stdarg.hVariable argument functions are declared in this header file
9signal.hSignal handling functions are declared in this file
10setjmp.hThis file contains all jump functions
11locale.hThis file contains locale functions
12errno.hError handling functions are given in this file
13assert.hThis contains diagnostics functions
www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

No comments: