Motorola Solutions Interview Question

Small coding question using C++