Infosys interview question

programming java and c and question in java