The correct answer is: C. no article, a, no article

The king of Scotland saw a spider trying to climb up to the ceiling of the cave.

The article "the" is used to refer to a specific person, place, thing, or idea. In this case, the king of Scotland is not referring to a specific spider, but rather to any spider. Therefore, the article "a" is used.

The article "the" is also used to refer to a unique or specific thing. In this case, the ceiling of the cave is not a unique or specific thing, but rather any ceiling of a cave. Therefore, the article "a" is used.