Examveda

What will be the output of the following C code?
#include <stdio.h>
#include <math.h>
void main()
{
    int k = sqrt(-4);
    printf("%d\n", k);
}

A. -2

B. 2

C. Compile time error

D. NaN

Answer: Option D


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output