Align Technology interview question

Find bugs in provided code (C++)