4 ms·
I had to fight through school and university in India with my teachers who believed these were legit questions to ask in written exams. Can't 100% blame them si
by sangeeth96 5mo ago
I had to fight through school and university in India with my teachers who believed these were legit questions to ask in written exams. Can't 100% blame them since almost all standard-issue textbooks had them and claimed they'd give predictable output. I thought the same until I noticed the weirdness when running them across different compilers and after I read about UB, sequence points and similar quirks in books that are not total garbage.
Luckily, I ended up with smug smiles in all those cases after showing them the output from different compilers.
- afdbcreid 5mo agoBut what answer did they expect? A specific number or that it's UB?
- sangeeth96 5mo agoA specific number.