Tuesday, 21 March 2017

C Header File

Header file is a file with extension ".h" which contains C Function definitions and declarations and to be shared between several source files.

Prototype of printf and scanf are define in stdio.h. When we call printf or scanf first call go to stdio.h and stdio.h take the original definition from library and load it.

There are two types of header files user defined and system defined we can include both by using preprocessing directive #inclde.

System Define Header File :

System header file c it is mean that all files are already stored in standard list of directories.To include in-constructed header report we use triangular bracket.

#include <fileName>  

User Define Header File :

User header files c it is mean that we can make our own header files and use it when need it. We can include it by using this syntax.

#include "fileName"  




No comments:

Post a Comment