Why we need to use # include < math.h >, # include < ctype.h >, # include < stdio.h >, # include < conio.h >, # include < stdlib.h > and # include < string.h >.
Ans: # include < math.h > :- For using some mathematical function
we need this header file. Some of the important mathematical functions in
header file math.h are:- sin(), cos(), sqrt() etc.
# include < ctype.h >: All the character functions require
ctype.h header file. The following lists are some function of ctype.
islower(c) It returns True if C is a lowercase
letter otherwise False.
isupper(c) It returns True if C is an uppercase
letter otherwise False.
Etc.
# include < stdio.h >: Standard input output. The following are
the list of functions are in stdio.h
gets() It gets a string terminated by a newline
character from the standard input stream stdin.
puts() It takes a string which is to be sent to
output device.
Etc.
# include < conio.h >: Console
Input Output. The following are the list of functions are in conio.h
clrscr() It clears the output screen.
getch() Gets a character from the console but does not
echo in the screen.
Etc.
# include < stdlib.h>: General purpose standard library
functions. The following are the list of functions are in stdlib.h
randomize() It initializes / seeds the random number
generator with a random number
random(n) It generates a random number between o
to n-1
Etc.
# include < string.h >: String Functions. The string functions
are present in the string.h header file. Some string functions are given below:
strlen(S) It
gives the no. of characters including spaces present in a string S.
strcat(S1,
S2) It concatenates the string S2
onto the end of the string S1. The string S1 must have enough locations to hold
S2.
strcpy(S1, S2) It
copies character string S2 to string S1. The S1 must have enough storage
locations to hold S2.
Etc.