Step 1: Parts of the internal carotid artery. The ICA is divided into four parts: cervical, petrous, cavernous, and cerebral. The cervical part gives no branch, the petrous part gives caroticotympanic and pterygoid branches, and the cavernous part gives meningeal, hypophyseal, and cavernous branches.
Step 2: Branches of the cerebral part. The cerebral (supraclinoid) part of the ICA gives the ophthalmic artery, posterior communicating artery, anterior choroidal artery, anterior cerebral artery, and middle cerebral artery.
Step 3: Locate the ophthalmic artery. Since the ophthalmic artery arises as the ICA emerges into the cranial cavity after leaving the cavernous sinus, it is a branch of the cerebral part of the ICA. So options (a), (c) and (d) are incorrect.
Step 4: Conclusion. The ophthalmic artery is a branch of the cerebral part of the ICA, so the correct answer is option (b).