EchoStar interview question

Three part: basic digital logic, c and basic circuit.