C++ 有符号整数和无符号整数修饰符之间的差别

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/luoganttcc/article/details/88528820
#include <iostream>
using namespace std;

/* 
 * 这个程序演示了有符号整数和无符号整数之间的差别
*/
int main()
{
   short int i;           // 有符号短整数
   short unsigned int j;  // 无符号短整数

   j = 50000;

   i = j;
   cout << i << " " << j;

   return 0;
}

猜你喜欢

转载自blog.csdn.net/luoganttcc/article/details/88528820