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

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz