Discussion :: C-MCQs
-
Comment on the output of this C code?
int main()
{
float f1 = 0.1;
if (f1 == 0.1f)
printf("equal\n");
else
printf("not equal\n");
}
Answer : Option A
Explanation :
0.1f results in 0.1 to be stored in floating point representations.
Output:
$ cc pgm5.c
$ a.out
equal
Be The First To Comment