What is the output of this program supposed to be and what am I doing wrong? (long one)

Printable View