Cognizant interview question

Basic c and c++ question