Hi,
Gives me a value of -32768. Code is written on 16 bit machine so unsigned int is 16bit and long unsigned bit is 32bit. How/why the value is negative?Code:long unsigned int ShiftedBit = 0; ShiftedBit = 1 << 15; printf("%ld", ShiftedBit);
Hi,
Gives me a value of -32768. Code is written on 16 bit machine so unsigned int is 16bit and long unsigned bit is 32bit. How/why the value is negative?Code:long unsigned int ShiftedBit = 0; ShiftedBit = 1 << 15; printf("%ld", ShiftedBit);