+ 1
0==0 means what?
if I write cout<<0==0; then it gives the output as 0. why and how? please explain.
2 Answers
0
you need brackets. What you are doing now is comparing (cout<<0) with 0
0
This is because == has a lower operator precedence than <<.
The compiler sees this as:
cout <<0; 0==0;
So 0 is output and then 0==0 is evaluated to true, but nothing is done with it.