哪位给解释下
这个是要求把十进制数换成32位浮点数,可是我怎么验算了,怎么都不太对#include<stdio.h>
int main(){
float test = 0.0f;
int after = 0;
int i = 0;
char * b = 0;
scanf(“%d”,&after);
test = after ;
b= (char*)&test;
for (i=sizeof(test)-1;i>=0;i++);
{
printf(“%x”, int(b[i]));
if(int(b[i]==0));
printf(“0”);
}
return 0;
}