Assuming you can do what you can't do (changing constant values) this is the answer:CodeMonkey wrote:
if 1 = 2 && 2 = 1,
what is 3 - (2*2) + 1?
¤You set 1 to 2
¤You set 2 to 1, but 1=2 so 2 is still 2
¤3-(2*2)+1 is 3-(2*2)+2 which is 1
Answer: 1
This is a discussion on Reply to CodeMonkey (thread got closed!!!) within the C++ Programming forums, part of the General Programming Boards category; CodeMonkey wrote: if 1 = 2 && 2 = 1, what is 3 - (2*2) + 1? Assuming you can ...
Assuming you can do what you can't do (changing constant values) this is the answer:CodeMonkey wrote:
if 1 = 2 && 2 = 1,
what is 3 - (2*2) + 1?
¤You set 1 to 2
¤You set 2 to 1, but 1=2 so 2 is still 2
¤3-(2*2)+1 is 3-(2*2)+2 which is 1
Answer: 1
No, all the 2's change to 1's and the 1's change to 2's
so the equasion now is:
3 - (1*1) + 2
= 3 - 1 + 2
= 2 + 2
= 4
Thread is here...
http://www.cprogramming.com/cboard/s...5&pagenumber=2
Visit entropysink.com - It's what your PC is made for!