Header File in C :
Header file contains different predefined functions, which are required to run the program. All header files should be included explicitly before main ( ) function.
It allows programmers to seperate functions of a program into reusable code or file. It contains declarations of variables, subroutines. If we want to declare identifiers in more than one source code file then we can declare such identifiers in header file. Header file has extension like '*.h'. The prototypes of library functions are gathered together into various categories and stored in header files.
E.g. All prototypes of standard input/output functions are stored in header file 'stdio.h' while console input/output functions are stored in 'conio.h'.
The header files can be defined or declared in two ways as
Method 1 : #include "header_file-name"
Method 2 : #include <header_file-name>
Method 1 is used to link header files in current directory as well as specified directories using specific path. The path must be upto 127 characters. This is limit of path declaration. Method 2 is used to link header files in specified directories only.
Standard Header Files :
Followings are the some commonly used header files which plays a vital role in C programming :
Link this post on your Blog/Website :