operation in C++. Please, help me :)

Can you please help me with this question.
Please give me a brief explaination.
thank you so much.

If a, b, and c are integer variables, some of these expressions are valid C++ and others are not. For each expression, add parentheses to indicate the precedence and associative rules, and hence decide which are valid and which are not. In each case, briefly explain in words the meaning of the valid expressions, or why the expression is not valid.
a == b = c;
a = b == c;
a == b == c;
= is assignment, it puts the value into a variable

== is comparison, it results in the expression being false (0) or true (any other value)

You need to be aware of the precedence of operators .

Edit:

To answer this properly you need to know the value of all the variables.
Last edited on
Topic archived. No new replies allowed.