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);
}
#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
Join The Discussion