C Programming and Data Structures: Unit I: C Programming Fundamentals

Header Files

C Programming

The header files contain standard library functions. For using these library functions directly in the program, it is necessary to include the header file at the beginning of the program.

Header Files

The header files contain standard library functions. For using these library functions directly in the program, it is necessary to include the header file at the beginning of the program.

Following are the header files supported by C


Some commonly used header files are

stdio.h: It is standard input output header file. In this file the functions for printf, scanf, fprintf, fscanf are defined. These functions deal with input and output functions.

conio.h: It is Console Input Output header file. In this file the typical functions such as clrscr() is defined. By using clrscr(), the console (output) screen gets cleared.

math.h In math.h all the functionalities related to mathematical operations are defined. Such as pow for computing power, sqrt for computing square root and many more.

alloc.h: This header file is used when a a function for allocating the memory dynamically, such as malloc() is used in the program.

Key Point: We have to include header files at the beginning of C program.

 

C Programming and Data Structures: Unit I: C Programming Fundamentals : Tag: : C Programming - Header Files