Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V = 2 # Assigns the value of 2 to variable V
print(bin(V)) # Prints the current value of V in binary
print(V) # Prints the current value of V in decimal
V = V >> 1 # Checking the new value of V after the bitwise right shift of int(2) i.e (from 0b10 to 0b01)
print(bin(V)) # Prints the new value of V in binary
print(V) # Prints the new value of V in decimal
OUTPUT
0b10
2
0b1
1
Hence, the answer is C
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
apextek1
Highly Voted 4 years, 2 months agoDamon54
Most Recent 3 months, 2 weeks agoNetspud
1 year, 3 months agomacxsz
2 years agorocky48
2 years, 2 months agorbishun
2 years, 6 months agoFR99
3 years, 7 months agoimsaad
3 years, 9 months agosacnar
3 years, 9 months agojohn_bosco_champion
3 years, 9 months agoimsaad
3 years, 9 months agoguillepowermetal
3 years, 11 months agoAmritansh
3 years, 11 months ago