本帖最后由 ok2222991 于 2012-8-7 11:33 编辑
#include <stdio.h>
void fun()
{
float fset;
short s;
unsigned short us;
int i;
unsigned int ui;
int iset;
fset = -1.0;
s = fset;
us = fset;
i = fset;
ui = fset;
printf("f = %.2f, s = %d, us = %d, i = %d, ui = %d\n", fset, s, us, i, ui);
iset = -1;
s = iset;
us = iset;
i = iset;
ui = iset;
printf("iset = %d, s = %d, us = %d, i = %d, ui = %d\n", iset, s, us, i, ui);
}
int main(void)
{
fun();
} |