-
Which of the following is the correct output for the program given below?
#include <stdio.h>
int main ( )
{
int a = 5;
float b = 5.0;
if (a == b)
printf (" a and b are equal\n");
else
printf ("a and b are not equal\n");
return 0;
}
-
- a and b are equal
- a and b are not equal
- Unpredictable
- No output
Correct Option: A
During comparison a would get promoted to a float and then two floats would be compared.