Algorithms Quiz | SP2 Contest 1 | Question 6
Predict the output of the below C program:
(D) None of the above
Explanation: Notice the space between the two minus(-) operators. Here unary operation minus(-) is applied twice instead of the pre-decrement operator, we know in maths that minus*minus gives plus. Therefore, – -3 = -(-3) = 3.
Quiz of this Question
Please comment below if you find anything wrong in the above post