long long unsigned int num = 20140701092715;
在C语言中编译器会把没有小数的数值常量默认为整形,这条语句编译器会报警告:
[root@localhost ~]# gcc -o test 1.c
1.c: In function ‘main’:
1.c:6: warning: integer constant is too large for ‘long’ type
为了标识是long long类型,处理方法:将20140701092715指定为long long unsigned类型:
long long unsigned int num = 20140701092715ULL;
c语言中long long类型的赋值,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/chegnshi-coding/p/3817674.html