Page 98 - Modular_V2.0_C++_Flikpbook
P. 98
9 HEADER FILES AND
LIBRARY FUNCTIONS
Your Aim
to learn about:
Header Files Functions of math.h Header File
Functions of stdlib.h Header File More Solved Programs
As you already know that C++ provides built-in functions. Built-in functions are defined inside
the header files. Hence, these functions are also called library functions. C++ provides a number
of header files to perform different types of operations like mathematical calculations, character
manipulations, input/output and error checking.
HEADER FILES
A header file is a collection of predefined functions that help improve a program’s productivity
and save development time. These header files come built-in with the C++ compiler and are
known as standard header files. The functions contained within them are called standard
library functions.
In C++, most header files have the .h extension. Several important header files and their purposes
are listed below:
Header File Description
iostream.h It provides standard input and output functions.
conio.h It provides functions for console input/output.
math.h It provides various functions to perform mathematical operations.
ctype.h It provides functions to handle characters in C++.
stdlib.h It provides various functions to perform operations like numbers
to text conversion, text to numbers conversion, memory allocation,
random numbers and various other utility functions.
To use any library function in your program, respected header file should be included at the beginning
of your program code. You can include a header file in your program by using the preprocessor
directive #include followed by name of the header file in between the angular brackets:
#include<iostream.h>
96
Touchpad MODULAR (Ver. 2.0)

