-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
float num = 0.2;
if (num == 0.2f)
{
printf("Equal\n");
}
else
{
printf("Not Equal\n");
}
}
-
- Equal
- Not Equal
- output depends on compiler
- Compilation Error
- None of these
Correct Option: A
0.2f results in 0.2 to be stored in floating point representations.