1.

A domain error occurs if x is negative and y is not an integral value for the function pow(double x, double y).(a) true(b) falseThis question was posed to me during a job interview.Enquiry is from Mathematical functions in division C Library of C

Answer»

The CORRECT answer is (a) true

Explanation: The pow() FUNCTION computes x raised to the power y. A domain error OCCURS if x is NEGATIVE and y is not an integral value. A domain error occurs if the result cannot be represented when x is zero and y is less than or equal to zero. A RANGE error may occur.



Discussion

No Comment Found

Related InterviewSolutions