Siemens interview question

Basic c++,