Q.

What is the output of the following code?
int main()
{
double x = 1.2;
int sum = (int) x + 1;
printf("sum=%d", sum);
return 0;
}

A. 2.2
B. 2
C. 2
D. conversion from double to int is not possible
Answer» B. 2
694
0
Do you find this helpful?
1

Discussion

No comments yet

Related MCQs