Pregunta de entrevista de Qualcomm

Some coding question in C++