The correct answer is D. No improvement.
The sentence "I am quite hopeful of securing very high marks in the examination" is grammatically correct and conveys the intended meaning clearly. The use of the preposition "of" after "hopeful" is idiomatic and appropriate in this context.
The other options are all incorrect. Option A, "to secure," is incorrect because it does not make sense to say that someone is "hopeful to secure" something. Option B, "to having secured," is incorrect because it uses the past participle form of the verb "secure" after the preposition "to." The past participle form of a verb is used to form perfect tenses, but the sentence is not about something that has already happened. Option C, "of having secured," is incorrect because it uses the infinitive form of the verb "secure" after the preposition "of." The infinitive form of a verb is used to express purpose or intention, but the sentence is not about someone's purpose or intention.