How does if(x==x==x) condition is evaluated in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How does if(x==x==x) condition is evaluated in c++

The answer is true if x=1, how?

21st Jul 2020, 4:44 PM
Chaitanya
1 Answer
+ 2
Precedence of == operator is from left to right. So first x == x from left is evaluated and then the result with the another x.
21st Jul 2020, 5:48 PM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar