int a = 3;
float x = 1/a;
printf("The value in x is: %f",x);
In some of the compilers the integer division returns an integer and hence cannot be stored in a float variable and to correct this you need to change the second line here with "float x=1.0/a;". Adding ".0" to 1 will make a difference.
Doesn't the C language feature automatic conversion in mixed expressions? In a situation where you are converting integer to float, there is no loss of any numeric value as there would be in assigning a float to an int. So why would Miracle C block this but Visual C++ does not?
When it comes to implementation, different compilers (gcc, Turbo C, Borlan C, Visual C++) all adhere to the core standards of ANSI C. Some compiler have functions, implementations that ...
Some specific help on why Miracle C compiler does not allow some feature of C compilation.