• C Programming Reference

• Other Reference

# Mathematical Functions MCQ Questions - C Programming

This section focuses on the "Mathematical Functions" in C programming. These Multiple Choice Questions (MCQ) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. C Programming allows us to perform mathematical operations through the functions defined in ______________ header file.

A. iostream.h
B. string.h
C. math.h
D. conio.h

2. Which of the following is correct mathematical operations in C Programming?

A. sqrt
B. pow
C. ceil
D. All of the above

3. Which of the following returns the square root of given number?

A. ceil
B. sqrt
C. floor
D. abs

4. abs(number) returns the absolute value of given number.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

5. Which of the following is true about pow?

A. rounds down the given number
B. rounds up the given number
C. returns the power of given number
D. returns the absolute value of given number

6. The cos function computes the cosine of x.

A. measured in degrees

7. A function is declared as sqrt(-x) under the header file math.h, what will the function return?

A. square root of x
B. complex number
C. domain error
D. range error

8. HUGE_VAL macro is used when the output of the function may not be ___________

A. integer number
B. short int
C. long int
D. floating point numbers

9. The C library function double fmod(double x, double y) returns the remainder of x divided by y.

A. log10(double x, double y)
B. fabs(double x, double y)
C. fmod(double x, double y)
D. floor(double x, double y)

10. All the functions available in this library take double as an argument and return double as the result.

A. Yes
B. No
C. Can be yes or no
D. Can not say