A function is declared as sqrt(-x) under the header file math.h,

a-function-is-declared-as-sqrt-x-under-the-header-file-math-h

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 error
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.