The correct answer is C.
A gerund is a verb ending in -ing that functions as a noun.
In "Check the smokes detector before exiting" exiting is not functioning as the continuous form of the verb "to exist" but as a noun.
A is wrong because "parking" and "exiting" are both functioning as adjectives.
B is wrong because "visiting" is functioning as an adjective, and "exiting" comes after "were" and therefore is a verb.
C is wrong because of the same reason as the second part of B. "Were exiting" is a verb.