Page 104 - Modular_V2.0_C++_Flikpbook
P. 104
Recap
A header file can be defined as a collection of predefined functions which you can use to
increase your program productivity and save your programming time.
The ctype.h header file contains the definitions of character handling functions.
The math.h header file provides several mathematical and trigonometric functions that you
can use to perform various mathematical operations.
The stdlib.h header file provides several general purpose functions for dynamic memory
management, random number generation, integer arithmetic, etc.
Exercise
A. Tick ( ) the correct option.
1. Which of the following functions is used to convert the entered character into uppercase?
a. toupper( ) b. isaplha( )
c. tolower( ) d. isdigit( )
2. Which of the following header files provides functions to handle characters?
a. ctype.h b. stdlib.h
c. iostream.h d. math.h
3. Which of the following functions returns the floating-point remainder after dividing two
fractional numbers?
a. fmod( ) b. sqrt( )
c. pow( ) d. fabs( )
4. Which function returns the absolute value of a number?
a. fabs(a) b. abs(a)
c. ceil(a) d. log(a)
5. Which of the following functions is used to terminate the calling process?
a. exit( ) b. abs( )
c. abort( ) d. div( )
B. Write ‘T’ for true and ‘F’ for false.
1. The ceil( ) function returns the value after rounding it up to the nearest integer. ……………………
2. The isalpha( ) function returns true if the provided character is an uppercase or
a lowercase letter. ……………………
3. The preprocessor directive is used to include a library file in your program. ……………………
4. The conio.h header file provides standard input and standard output functions. ……………………
5. The output of the abs(67) function will be -67. ……………………
102
Touchpad MODULAR (Ver. 2.0)

