math.h (Note: Never hesitate to use the help/manual.)
Because it contains definitions of mathematical functions such as cos, sin, tan, power (pow) and so on. Thus if you want to use mathematical functions in your programs you have to include math.h
No. Header files are those which contains declaration part of function & library files are those which contains definition part of function. These are those functions which we called in our program by using header files.
A header file contains declaration of something (constants, classes, ...), usually ends with a .h or hpp extension.A DLL (dynamically linked library) is a binary file (with .dll, .ocx, .a, ... extentions), containing functions, resources, ... and can be linked to your program at run-time. In order to use a DLL you need to include the corresponding header file, which declares things in the DLL, so that your program gets compiled. The DLL file is automatically loaded (by system) at run-time when your executable program invokes functions and asks for resources.A library file (also called static library, with .lib extension usually) is a binary file which also contains functions and variables like DLL, but resolved at compile-time, meaning they need to be provided at link-time.Dynamic and static libraries are often provided together with header file (but no source file, which contains the implementation) when the provider lets you use his/her functions/services but doesn't give you access to the implementation.
Header File in C/C++ are the files which contains the definition of the pre-defined functions, data-types & constants, etc. By adding the header file you reduce your job of defining the same functions which are defined earlier by someone else & you can use those functions/data-types easily.
The header file for random functions ( like rand(), srand() ) is stdlib.h in C and cstdlib in C++.
The <iostream> include file is a header file that contains the prototype declarations of functions that provide the basic input/output mechanisms in C++. The <iostream> header file sets up the objects that initialize the basic input/output pathways, cout and cin.
A non-standard C header file that contained functions specific to accessing functions of MS-DOS. There is no need to use this header file, as there are standard libraries included in all major compilers that replace the functions in DOS.H.
EX: pgm #include<stdio.h> main() { printf("haiii"); } Header file: (1) contains the function(printf) declaration (2) during preprocessing, the printf function is replaced by the function declaration Library file : (1) contains the function(printf) definition (2) during linking, the function declaration is replaced with the function definition.obviously, everything will be in object while linking
A header file is a library of a no. of functions, which could be used (once or more than once) in some or the other programs. Thus, instead of defining all functions separately we can assemble them in a single library, the header file. These can be predefined or user defined. Hence, it reduces the line of codes and also the complexity.
It contains useful function-prototypes.
The header, io.h, is part of the standard C library and contains declarations for file handling and I/O functions. The file has no practical purpose in C++; it is only included because it was required prior to C++ standardisation. However, it can be used when writing C-style programs and libraries in C++.