1.

Which of the following is used to find the absolute value of the argument in C++?(a) abs()(b) fabs()(c) mod()(d) ab()I got this question during an interview.Question is taken from Computational Geometry topic in portion Computational Geometry of Data Structures & Algorithms II

Answer»

Correct CHOICE is (b) fabs()

EASIEST explanation - In C++ the ABSOLUTE value of an argument can be found by using the FUNCTION fabs(). It is available under the header file math.h.



Discussion

No Comment Found

Related InterviewSolutions