Snap Interview Question

debug a piece of C/C++ code