Cognizant interview question

Basic questions from c, c++