Message from C, C++ discussions

December 2019

— Or it can evaluate in random order and return just the last one?


The order or evaluation of function parameters is not defined, e.g. clang has a different one than gcc.

— Well, comma operator is not a function technically..

— Use %c

— A function call does not invoke the comma operator though

— A function call is a postfix expression followed by parentheses containing a possibly empty, comma-separated list [...] []

Message permanent page

— Of course, in a function call it is just a separator

— Look at line 14, there's no function call

— Oh damnit just saw it - nvm :D
totally missed it on my phone - sry

— I guess that's why sharing pictures of code is a bad idea ¯\_(ツ)_/¯

— x++ is executed (x is 11), then ++x is executed and assigned to y, so x and y are 12

— How the variable y got the value 12