DEV C++ 5.11版本,win7操作系统
#include <bits/stdc++.h>
using namespace std;
int main(){
unsigned long long n;
n = 1 << 31;
cout << n;
return 0;
}
输出为:18446744071562067968
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
n = 1 << 31;
cout << n;
return 0;
}
输出为:-2147483648
真是奇了怪了。