Pergunta de entrevista da empresa Lutron Electronics

Asked me to solve a pointer question