IBM interview question

Identify bugs in sample program