I think the code in your top post looks fine, for REAL (non-tutorial) code. With those 8-character indents, it may even satisfy Linus Torvalds.
To teach a basic CONCEPT (other than error handling methods), I think the concept could should not be bogged down by "non-concept" error handling, and should fit the page so it can be studied and grasped without a lot of scrolling.
They are two different styles for two different purposes, and both have their place. The "condensed tutorial" style I use here is actually fairly popular in research papers (of which I have read MANY in my fields of interest), which also were meant to teach a basic concept.
And thanks for condensing an example for me so that I can easily grasp it. Your top post code is a bit overwhelming for me. Different strokes for different folks, as they say. Thanks.
There is room here for both of us, without harsh criticism. I am not PUSHING my personal (recreational) coding style on anybody. It is very easy to reformat it using AStyle. Please do so if that makes it easier for you to comprehend.
Unfortunately, AStyle does not support a condensed coding style that suits me, so going the other direction takes extra work on my part. I usually default to K&R style for commercial work.