Domanda di colloquio di Intel Corporation

two logic questions and one programing question.