I exactly don't know how why output is coming
float f=1.4, t;
int d,s;
d=(int)f;
printf("d=%d\n",d);
t=f-d;
printf("t=%f\n",t);
t=t*10;
printf("t=%f\n",t);
s=(int)t;
printf("s=%d\n",s);
the output is
d=1
t=0.400000
t=4.000000
s=3
and similarly when f=1.1
the output is
d=1
t=0.100000
t=1.000000
s=1
Is this related to the way the integer and float is stored in the memory or something else ?