jjzcp
Experienced Member
Will this program work in standardized C compilers?
#include<stdio.h>
main()
{
float a;
int b;
a = 5;
b = 2;
printf("%f", a/b);
}
It should work right, because even though an interger, and float is used, the resulting number is a float. It works in my turbo c compiler, but not sure in other new compilers.
#include<stdio.h>
main()
{
float a;
int b;
a = 5;
b = 2;
printf("%f", a/b);
}
It should work right, because even though an interger, and float is used, the resulting number is a float. It works in my turbo c compiler, but not sure in other new compilers.