logoalt Hacker News

Timwiyesterday at 8:14 PM1 replyview on HN

The statement is valid C#, which has left-to-right execution order and no undefined behavior. The answer is 5 + 7 = 12.


Replies

chasilyesterday at 8:16 PM

Awk also says it's 12.

  awk 'BEGIN{a=5; a = a++ + ++a; print a}'
  12
show 1 reply