Amdocs Interview Question

A small coding question inc++