Q40
What is the result of ~5 ?
A.
5
B.
-5
AnswerC.
10
D.
-6
Answer: Option B
Solution
Answer: Option B
Solution:
The ~ operator performs bitwise NOT, inverting the bits of the number.
Python MCQs: Bitwise and Boolean Operations Chapter
Programming · Python · question 40
Q40
Answer: Option B