InterviewSolution
Saved Bookmarks
| 1. |
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 errorI got this question during an interview.This interesting question is from Mathematical functions topic in division C Library of C |
|
Answer» CORRECT answer is (c) domain error Explanation: double SQRT (double x); The sqrt function computes the nonnegative SQUARE root of x. A domain error occurs if the argument is negative. |
|