C++ Standard Headers
(Q & A)
Q1: What is the purpose of a header file in a program?
Answer: Header files provide function prototypes, definitions of library functions, declaration of data types and constants used
with the library functions.
Q2: What is the purpose of the following header files?
a) iostream.h b) stdio.h c) ctype.h
d) string.h e) math.h f) stdlib.h
Answer:
iostream.h: Defines stream classes for input/output streams
stdio.h : Standard input and output
ctype.h : Character tests
string.h : String operations
math.h : Mathematical functions such as sin() and cos()
stdlib.h : Utility functions such as malloc() and rand()





