ThinkLABS Interview Question

Very basic electroincs, c programming