Anonymous interview question

Predict the output question in C and java