Why bitwise operation (~0); prints -1 ? In binary , not 0 should be 1 . why ?
(~0);
For 32 bit signed integer
~00000000000000000000000000000000=11111111111111111111111111111111 (which is -1)
~00000000000000000000000000000000=11111111111111111111111111111111