Nev*_*own 3 c c++ sizeof
这是我的C代码:为什么输出"False"?????
为什么4> -1 ???
代码:
#include <stdio.h> int main() { if (sizeof(int) > -1) printf("True"); else printf("False"); return 0; }
MTi*_*ted 11
因为sizeof(int)是无符号的.因此-1转换为大的无符号值.
归档时间:
12 年 前
查看次数:
309 次
最近记录: