Question d’entretien chez Cisco

How to efficiently implement log function using C?