In c, when several operations occur in an expression, each part is evaluated and resolved in a predetermined order called operator precedence(priority) but multiplication and division have same precedence hence if two operators of same precedence is present in an expression, associativity of operators indicate the order in which they execute. Here the associativity is from left to right.
(You can read more about it here What is associativity of operators and why is it important?).
So when evaluated from left to right 40/100 undergoes integer division to give 0 and when multipled with s the result of da was also 0 and and same with hra giving the result 25000.
All you had to do was write
da = s*40/100
and hra = s*20/100
.
The the entire
value would have been treated as float and your result would have been correct.
As implemented below,
#include<stdio.h>
//Compiler version gcc 6.3.0
int main() {
float da, hra, s, gs;
scanf("%f",&s);
da = s*40/100;
hra = s*20/100;
gs=s+da+hra;
printf("s=%f, da=%f, hra=%f\n",s,da,hra);
printf("%f",gs);
return 0;
}