Final answer:
The ilioinguinal nerve is the one located on top of the spermatic cord, and is responsible for innervating the skin in the inguinal region.
Step-by-step explanation:
The nerve that is located on top of the spermatic cord is the ilioinguinal nerve. This nerve is part of the lumbar plexus and plays a role in innervating the skin in the inguinal region, which is in the lower part of the abdomen near the groin. The options provided in the question are other nerves with different functions: the hypoglossal nerve (cranial nerve XII) controls tongue movements, the facial nerve (cranial nerve VII) is responsible for facial expressions and some functions of taste and salivation, and the epigastric pertains to the epigastric region of the abdomen rather than a nerve. The correct answer to the question, 'Which nerve is located on top of the spermatic cord?' is C. ilioinguinal.