We have to solve a simple equation using C where the values of the variables are already given as
a = 2, b = 3, c = 4
the equation is:
a + b *= c - +5
I am getting an error message as "lvalue required as left operand of assignment"
I had tried to put the equation equal to some new variable such as x and then I was trying to find the answer. Even if I am removing a variable from the equation it does not show any error and gives the output.
>Solution :
I don’t know what you are trying to do, but *= doesn’t appear to do what you think it does.
*= is an assignment operator. It evaluates its left-hand side and its right-hand side, multiplies them together, and assigns the result to the result of its left-hand side.
The result of a + b is not something to which you can assign. This is not valid code.
