1.

Explain any three mathematical functions in C++.

Answer»

1. a cos() function:

It is a mathematical function that returns the arc cosine value for the given argument. The argument value must be in the range -1 to 1, otherwise, a domain error is triggered.

Syntax: float acos ( float arg);

2. cos() function:

It is a mathematical function that returns the cosine Value for the given radians.

Syntax: float cos( float arg );

3. cell() function: It is a mathematical function that returns the smallest integer value that is not less than the specified number. In other words, it returns the Round-Up value of a given number.

Syntax: float cell( float num);

4. exp() function:

It is a mathematical function that returns the natural logarithm base “e” raised to the power equal to the argument.

Syntax: float exp( float num);

5. sqrt() function:

It is a mathematical function that returns the square root of the given “num” value.

Syntax: float sqrt( float num);



Discussion

No Comment Found

Related InterviewSolutions