XYZ (Turkey) interview question

C, java basic to intermediate question