Header File
C programs are divided into modules or functions. Some functions are written by users, like us, and many others are stored in the C library. Library functions are grouped category wise and stored in different files knows as Header File.
Header file contains different predefined functions, which are required to run the program. All header files should be included explicitly before main ( ) function.
Header file has extension like '*.h'. The prototypes of library functions are gathered together into various categories and stored in header files.
Example :
All prototypes of standard input/output functions are stored in header file 'stdio.h'.
Declaration:
This is achieved by using the preprocessor directive #include as follows :
#include<header_filename.h>
example : #include<stdio.h>
header_filename is the name of the library file (like stdio) that contains the required function definition.
Written by "Shojib"
No comments:
Post a Comment