#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
short a=1000000000000000;
short b=a-1;
short c=1000000000000000+0000000000000001;
printf("%hd\n",a);
printf("%hd\n",b);
printf("%hd\n",c);
return 0;
}-32768
32767
-32767
疑惑如下:
1:short a=1000000000000000这是源码还是补码?
2:运算的时候是源码运算还是补码运算?
3:输出的时候。是输出的源码对吗? |
|