What will be the output of the following C code?
#include <stdio.h>
void main()
{
double x = 123828749.66;
int y = x;
printf("%d\n", y);
printf("%lf\n", y);
}
#include <stdio.h>
void main()
{
double x = 123828749.66;
int y = x;
printf("%d\n", y);
printf("%lf\n", y);
}
A. 0, 0.0
B. 123828749, 123828749.66
C. 12382874, 12382874.0
D. 123828749, 0.000000
Answer: Option D
Join The Discussion