What do you expect it to be? On line 2 assignment precedes the increment. On line 3 it's an expression so increment/decrement need to be evaluated first before both numbers are multiplied.
Maybe this will be more clear:
Assignment operator preceds the increment. Moreover, the value of a is initialised to be 10 and then multiplied with 11 which gives the result 110. For help on operators in C, follow the link : http://knowledgetpoint.com/csharp/csharp-language-fundamentals/
Comments
First off, your code is not even valid C.
Now translation of your code:
For why that is go read some about sequence point.
Hey boo ,sorry I didn't mention that a is int data type, but u didn't explain it well why in last line it's 11*10
What do you expect it to be? On line 2 assignment precedes the increment. On line 3 it's an expression so increment/decrement need to be evaluated first before both numbers are multiplied.
Maybe this will be more clear:
Assignment operator preceds the increment. Moreover, the value of a is initialised to be 10 and then multiplied with 11 which gives the result 110. For help on operators in C, follow the link : http://knowledgetpoint.com/csharp/csharp-language-fundamentals/