#include <iostream>
using namespace std;
int main() {
// short int 2個字節(jié) 16位
short int i; // 有符號短整數(shù)
unsigned short int j; // 無符號短整數(shù)
j = 50000;
i = j;
cout << i << endl << j;
return 0;
}
-15536
50000
無限循環(huán)
#include <iostream>
using namespace std;
int main() {
for (;;) {
printf("This loop will run forever.\n");
}
return 0;
}