NTT DATA interview question

Basics in c and java