I am using an assignment statement like: long long m = 2<<31;
Why this line gives warning " Signed shift result requires 34 bits to represent but, int only has 32 bits"? When I try to print m, output is 0.
When I use sizeof(long long) it says 8 bytes, i.e. 64 bits, much more than 32 bits. Then why it cannot accomodate?
Very much confused..please help.