Cognizant interview question

c,c++,java