I wrote a code like this
#include<iostream>
using namespace std;
int main()
{
int w=32;
int x=1<<w;
int z=1<<32;
cout<<"X : "<<x<<endl; //Case 1
cout<<"Z : "<<z<<endl; //Case 2
return 0;
}
On running output is X : 1 and Z : 0 Please help me how answer is different in the two cases.