C Quick Refresher

Simple Floating Point Program
What is the output of the following Program?

int main()
{
int m, n, o;
float res;
m = 10;
n = 15.7;
o = -45;
res = (m * n + o) * 0.1;
printf("%.2f", res);
}

Student
Abishek M   28-Jan-23

The output is 10.50

Support Team
Support Team   28-Jan-23

Good. Keep it up. Thanks.
REPLY