Technology

What is the Header file?

Meaning of header file in c language is the Simple programs can be kept in a single, but when program have a larger size then it impossible to put it all in just one file. Then you can kept in a header file.

  • When a parts of program kept in separate file, then create a header file.
  • Header file is denoted as ‘.h’ extention.
  • Header files used in programs with the preprocessor directive #include.
  • Header files are precompiled files.
  • Contains function definition, Macro definitions.
  • Including Header files is like copying it’s content to our program.

Syntax of header file in c language

#include

OR

#include”file”

Example:

#include int x; #include”karl.h” int main() { printf(“Program done”); return 0; }
S.r. NO. Name Description
1.conio.hConsole
Input/output
2.assert.hDiagnoshics
Function
3. ctype.hCharacter Handling Functions
4.stdio.hInput/Output
Function
5.stlib.hFunctions standard header file
6.math.hMath header file
7.time.hTime header file
8.asert.hAssertion header file
9.locale.hLocalization header
10.signal.hSignal header file
11.setjmp.hJump header file
12.stdarg.hStandard argument header
LIST OF HEADER FILES
What is header file in c language?

A header file is a file with extension. In this function h contains function declarations and micro declaration to be shared with between several Sources.

What are the types of header files?

1. Standard header files
For example : stdio.h, string.h,time.h,math.h.
2. User defined header files
A file in which user can define it’s own function which you can use in main program.

What are the steps for creating header file in c language?

1. Step :1 type this code.
2. Step:2 save code.
3. Step :3 write a main program.
#include<stdio.h>int x;#include”karl.h”int main(){ printf(“Program done”); return 0;}

Why use the Header file in c language?

Header file allows to write definition of function in one file and also it is able to use in another file. Because of this happen when you include standard files from the standard library functions. Header file contains definition of function.

Basic concepts of c programming language

Something Wrong Please Contact to Davsy Admin

Leave a Reply

Your email address will not be published. Required fields are marked *