Cadence Design Systems interview question

basic c++