NIELIT O Level Exam

what will the output of : print(5&3)

what will the output of : print(5&3)

इसका आउटपुट क्या होगा: print(5&3)

A. 1

B. 8

C. True

D. False




Correct Answer is :

A. 1



Explanation

The & operator in Python performs bitwise AND operation. It takes the binary representations of two numbers and performs a bitwise AND operation on each pair of corresponding bits.

binary of 5 is : 101

binary of 3 is : 011

bitwise &    : 001 which 1 in decimal so the correct answer is 1

Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad