Motorola Solutions interview question

Small coding question using C++