🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

Python में print(~100) का आउटपुट क्या होगा?

What will be the output of print(~100) in Python?

A
-101
B
101
C
-100
D
100
Explanation

In Python, ~ is the bitwise NOT operator.
It flips all the bits of the number using this formula:

 x=−x−1\text{~x} = -x - 1

So,

 100=−100−1=−101\text{~100} = -100 - 1 = -101


Hindi:
Python में ~ एक bitwise NOT ऑपरेटर है।
यह संख्या के सभी बिट्स को उल्टा कर देता है और फॉर्मूला होता है:

 x=−x−1\text{~x} = -x - 1

इसलिए,

 100=−100−1=−101\text{~100} = -100 - 1 = -101


Final Output: -101

Correct Answer: A) -101

Latest Updates