Cognizant interview question

C,C++,java