What will be the output of the following C code?
#include <stdio.h>
printf("%.0f", 2.89);
#include <stdio.h>
printf("%.0f", 2.89);
A. 2.890000
B. 2.89
C. 2
D. 3
Answer: Option D
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion