Test Series - cpp

Test Number 97/102

Q: To which type does the numeric limits are suitable?
A. Character types
B. Mixed type
C. Arithmetic types
D. Relational types
Solution: Numeric limits provides the information about the properties of arithmetic types.
Q: Where does the member should be defined if it is used in the program?
A. Namespace scope
B. Character scope
C. Namespace & Character scope
D. Directional scope
Solution: The member shall still be defined in a namespace scope if it is used in the program.
Q: What will the max function in the numeric limit will return for type float?
A. Maximum finite value for a float type
B. Maximum finite value
C. Minimum finite value
D. Minimum float value
Solution: Max function in the numeric limit will return the maximum finite value for a float type.
Q: Which header file is used for the numeric limits in C++?
A. 
B. 
C. 
D. 
Solution:  header file will be used for numeric limits in C++.
Q: Pick out the incorrect static function member in numeric limits.
A. denorm_min
B. digits
C. infinity
D. max_finite
Solution: max_finite is the incorrect static function member in numeric limits.
Q: With which does the trigonometric functions work with angles in c++?
A. Degrees
B. Radians
C. Both Degrees & Radians
D. Celsius
Solution: The trigonometric functions work with angles in radians rather than degrees.
Q: Which header file is required for manipulation of math functions in c++?
A. cmath
B. maths
C. math
D. dmath
Solution: #include is a header file required for manipulation of math functions.
Q: How many macros are used by mathematical functions in the header file ?
A. 1
B. 2
C. 3
D. 4
Solution: There are three macros used in mathematical functions. They are HUGE_VAL, EDOM, ERANGE.
Q: Which of the following mathematical function is overloaded in  and ?
A. cos
B. tan
C. sin
D. mod
Solution: Because tan has more different definition in normal case and in case of complex number i.e. tan = sin/cos(normally) and tan = y/x in complex numbers.
Q: How many parameters are used in frexp function?
A. 1
B. 2
C. 3
D. 4
Solution: There are two parameters that are used in frexp function. They are floating point value to be computed and pointer to an int object.

You Have Score    /10