Report Bug

Qus

What will be the output of the following expression

x=14
print(x>>2)

Qus

निम्नलिखित एक्सपरशन का आउटपुट क्या होगा

x=14
print(x>>2)


A. 14
B. 1
C. 3
D. 2


Solution
C. 3



Explanation

hear >> bitwise right shift operator which perform the Right shift Operation:

x=14

in binary 14 is  1110

now when we shift 2 bits to the right then value become 0011

now 0011 is convert in decimal which is equivalent to 3, so the answer is 3

Latest Current Affairs 2025 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