It might not be isolated to C/C++ either but since I dev in C++ I put it here when I didn't know where else to put it!
Anyway here is my question.
Is it possible for a variable to change value if a program is running for whatever reason?
My friend say "no" I say "It is might not happen but it is possible".
This is the snippet of code he commented on
assert(s2 == s5); assert(s2 != s3); assert(s2 != s5);
My argument is that something in the computer might unintentionally or by corruption change the value in the memory(?)location my "s2" is "assigned" to, so if the first assert passes and the program continues to the next and that passes too it MIGHT happen that the next assert also passes because by some "fluke" something in the computer changed the value so it will pass. My friend say it is impossible, for me is is possible even if it is a very small possibility for it to actually happen.
So even if it is really unlikely can it happen?
I hope I was clear enough in what I wanted to know! />/>
This post has been edited by FrozenSnake: 11 January 2013 - 11:07 AM