Atos-Syntel interview question

Basic c/c++