You have undefined behavior all over the place: dereferencing
or incrementing a pointer casted to a type that is not the
type of the underlying object is undefined behavior.
His code is just a slight modification of the code he cited.
Which looks like some of the worst code I've seen in a long
time; he should really avoid that site, if that's the sort of
junk they post.
The original posting basically had:
struct X { int i; double d ; } ;
and px1 was a pointer to an X. It then did (double*)((int*)px1
+ 1), apparently expecting to access the d element. Which not
only is undefined behavior, but doesn't work with most of the
compilers I have access to (and will, in fact, generate a bus
error). His modification uses an operator with higher
precedence that the cast, so his incrementation results in
accessing an inexistant X; I get random values (which could
result in a floating point exception, if the random value
corresponded to a trapping NaN).