Step 1: Understanding.
Direct speech "Thank you!" is an expression of gratitude. In indirect speech, such expressions are converted into verbs like "thanked."
Step 2: Checking options.
(A) Correct — "Ramesh thanked me" is the right indirect form.
(B) Incorrect — "can thank" changes the tense.
(C) Incorrect — "may thank" changes the meaning.
(D) Incorrect — "has to thank" implies obligation, not gratitude.
Step 3: Conclusion.
Correct answer is (A) Ramesh thanked me.