SRI interview question

Basic c++