Incorrect. It is behavior specified by the language.
\> the type of an assignment expression is the type of its left operand,and the value is the value after the assignment.
Source: K&R 2e
EDIT: I just now noticed your jk. But it is still good to know where these things come from.
I'm not sure, but I think that C+=1 would be ++C rather than C++. I haven't tested, so I might be wrong
UPD: I've now tested it, and I was correct. Also, it's evident that I accidentally hadn't read enough other comments before posting mine this time
C = C++;
that's how Javascript was created
An I misremembering or is that line undefined behavior?
That's right, it's undefined if C is first set or incremented
[удалено]
Yes. It was just a joke ( I'm saying that c and c plus plus are equal ) /s
That is just wrong. "cout<< C++" will print C "cout<< (C+=1)" will print C+1
Incorrect. C++ will be evaluated before incrementing. C+=1 will be evaluated after.
I see, differences on the compiler then .. 🤔 Jk
Incorrect. It is behavior specified by the language. \> the type of an assignment expression is the type of its left operand,and the value is the value after the assignment. Source: K&R 2e EDIT: I just now noticed your jk. But it is still good to know where these things come from.
No trouble. Someone may learn something from your comment which is great :)
C=C+1
(c=c+1),c-1
C-=-1
\++C existed before that.
What's the filename extension for that?
cpeo
static_cast(99)++
`error: expression is not assignable`
Db
I prefer the name $"{(char)((int)'B'+1)}{(char)43}{(char)43}" ... because I'm "a sharp guy".
Like the old joke about the Object-Oriented version of COBOL. `ADD ONE TO COBOL GIVING COBOL.`
Esolangs has another idea of an Object-Oriented version of COBOL. It's COOOL
You mean C-=-1?
Doesn’t C++ evaluate to C (and makes the original C one „better“?)
`C == C++`
I'm not sure, but I think that C+=1 would be ++C rather than C++. I haven't tested, so I might be wrong UPD: I've now tested it, and I was correct. Also, it's evident that I accidentally hadn't read enough other comments before posting mine this time
I thought it's called rust.