0
doubt with a code in C++
Why this code results in "0"? int a=10; int main() { cout<<(a==9) }
8 Answers
+ 2
0 means condition result is false because a is not equal to 9
+ 2
0 because 10 is not equal to 9.i think you have to include <stdbool.h>
for using bool.
+ 1
0 means condition result is false because a is not equal to 9
+ 1
0
0
If a=10, I understand that in the next line, "a" keeps te value, and then test equal to 9, but I donÂŽt undertsand why the result is "0"
0
Thanks a lot Roman J, for the clarification
Best Regards
0
Where u use (9==10) its treat like if, else condition. here 9 is not equal to 10 so condition false and output become 0