Home > Back-end >  O great god answer
O great god answer

Time:10-20

A small white
Learn c operator + + - encounter a problem
Int a=b=45 10 c=0;
C=- a + +
Why print result c value is 88, not 89?

CodePudding user response:

Since the decrement operator can only be used alone, a + + and you this kind of writing is not possible

CodePudding user response:

Write Suggestions separately, not + + and - front and after placed together.
Such expressions have side effects, for code portability is poor.

CodePudding user response:

Since with the decrement of this same variables appear in the same statement, the established such use is not allowed in C, different compilers may occur as a result, different beginners don't write code, to separate,

CodePudding user response:

reference 3 floor apache Hehe reply:
since with the decrement of this same variables appear in the same statement, the established such use is not allowed in C, different compilers may occur as a result, different beginners don't write code, to separate,

B: yes, it is to look at the video courseware to tell the teacher, is probably out specially

CodePudding user response:

1/f, reference and 蘤 old crepe response:
since the decrement operator can only be used alone, a + + and you this kind of writing is not

Ok, thank you for the great spirit

CodePudding user response:

reference 2 building self-confidence boy reply:
proposal written separately, after don't + + and - front and placed together.
Such expressions have side effects, for code portability is poor.

Ok, thank you for your great god give directions
  • Related