+ 1
(0==0) means what?
if I write cout<<(0==0); then what output would I get?? why and how? please explain
2 Answers
+ 3
it checks that LHS is equal to RHS. If true it returns 1 or else it return 0
so the output will be 1
+ 2
== is like asking the program "this is equal, correct?" since 0 is equal to 0 it will return 1 (which means true). if it wasnt equal it would return 0(which means false)