Pregunta de entrevista de Microchip Technology

they asked me to code a simple c utility function.