The previous solutions are all correct soI will add only this : as a beginner I recommend that you avoid compound operations as you are getting started. By that, I mean printing the result of an inline calculation is a compound operation which you found confusing. If you avoid this and try to write simpler code it will be less confusing for you. For example, this is another way to write what you have :
#include <stdio.h>
int main()
{
int result;
result = 25 / 2;
printf("%f\n", result );
return 0;
}
That will also give you an incorrect output but you can see the intermediate result in the process. To get a better answer you should do something like this :
int main()
{
double result;
result = 25.0 / 2.0;
printf( "%f\n", result );
return 0;
}
The key here is the format specification you pass to printf needs to agree with the arguments you pass to it as Mr. Pallini mentioned.