why does n&!(n1) for n=6 gives 0 in C++ and 2 in python . it should give 2 though . asked 12 Sep '17, 22:42

! is an invalid operator in python but in c++ it coverts a true statement to false and vice versa . The real compliment operator is ~ . By convention in c++ every positive number is true in c++ and 0 is false . So ! operator converts the positive number which is true into false which translates to 0 . And the AND operation with 0 yields 0. answered 12 Sep '17, 23:07

Extract lowest set bit (BLSI) is answered 16 Sep '17, 02:20

Answer is hidden as author is suspended. Click here to view.
answered 16 Sep '17, 08:31
