Cisco Interview Question

asked me to tell the logic for different codes