

InterviewSolution
Saved Bookmarks
1. |
What does ~~~~~~5 evaluate to?(a) +5(b) -11(c) +11(d) -5 |
Answer» The correct answer is (a) +5 Easiest explanation - ~x is equivalent to -(x+1). ~~x = – (-(x+1) + 1) = (x+1) – 1 = x ~~x is equivalent to x Extrapolating further ~~~~~~x would be same as x in the final result. In the question, x value is given as 5 and “~” is repeated 6 times. So, the correct answer for “~~~~~~5” is 5. |
|