Pregunta de entrevista de Cisco

How to efficiently implement log function using C?