Which header file is used for mathematical functions in C?

Which header file is used for mathematical functions in C?

a) stdlib.h
b) math.h
c) string.h
d) stdio.h

Answer:

b) math.h

Explanation:

The math.h header file in C is used to include mathematical functions such as sin(), cos(), sqrt(), pow(), and many others. These functions are essential for performing complex mathematical calculations in C programs. Including this header allows you to use a wide range of mathematical operations without having to implement them from scratch.

Understanding the math.h library is important for performing mathematical computations in C efficiently.

Reference links:

https://www.rameshfadatare.com/learn-c-programming/

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top