Quest Global interview question

odd or even program and algorithm explained