short sho1, sho2;
printf("Enter two shorts.\n");
scanf("%hd %hd", &sho1, &sho2);
printf("%hd^%hd is %hd.\n", sho1, sho2, sho1^sho2);
Run Code Online (Sandbox Code Playgroud)
当我输入'2 2'时,我得到这个输出:
2 ^ 2是0.
怎么会?我在Eclipse中使用MinGW GCC编译器,以防万一.
| 归档时间: |
|
| 查看次数: |
5474 次 |
| 最近记录: |