Mobiloitte Interview Question

simple question from Java and c