Discussion :: Python MCQs
- What is the result of the expression if x=15 and y=12:
Answer : Option C
Explanation :
The symbol '&' represents bitwise AND. This gives 1 if both the bits are equal to 1, else it gives 0. The binary form of 15 is 1111 and that of 12 is 1100. Hence on performing the bitwise AND operation, we get 1100, which is equal to 12.
Be The First To Comment