Why bitwise operation (~0); prints -1 ? In binary , not 0 should be 1 . why ?
(~0);
0 here is not a bit. It is a byte (at least; or more) - 00000000. Using bitwise or we will have 11111111. It is -1 as signed integer...