4 ms·
> The interesting thing here is the Undefined Behavior (UB), well... actually two UBs, thanks to which there are three possible correct answers: 11, 12 and 13.
by Someone 5mo ago
> The interesting thing here is the Undefined Behavior (UB), well... actually two UBs, thanks to which there are three possible correct answers: 11, 12 and 13.
There’s UB, so any answer is possible, isn’t it?
- gynvael 5mo agoHey! Author here :) I'm going top-to-bottom through comments, and there was a similar question, so I'll link my answer here: https://news.ycombinator.com/item?id=48140821 https://news.ycombinator.com/item?id=48140821 (TL;DR: you are right, but there's another perspective on this)