+ 1
float a=3,b=2; printf("%d",a/b); printf("%f",a/b);
where my answer gets stored and why i get garbage for %d
1 Réponse
0
because a/d is not converted to int and float and int numbers are not represented the same way in a binary scale
do :
printf("%d ",(int)(a/b));