On Visual Studio compiling following C code , the result is 4 .
void main() { int c = 1; c = c<<34;}
The assembly code as seen from on Visual Studio disassembly window is
shl eax,22h
From assembly , its easy to see that we are shifting 34. Since the integer here is 4 bytes , from the results it is obvious that modulo operation was carried out on machine level to make this work as shift by 2.
I was wondering if this behavior is standardized across platforms or varies across platforms?