Correct option is D
Correct passive voice: (d) Why was such a nasty letter written to you by your friend?
Important points:
• The active sentence is in Simple Past: did + write (V¹).
• Passive in Simple Past uses: was/were + V³.
• Interrogative passive structure: Why + was/were + object + V³ + (by + subject)?
Grammatical Rule (English):
• Active: Why + did + subject + V¹ + object?
• Passive: Why + was/were + object + V³ + by + subject?
व्याकरणिक नियम (Hindi):
• Simple Past के passive में was/were + V³ आता है और प्रश्नवाचक वाक्य में क्रम होता है: Why + was/were + object + V³।
Why other options are incorrect:
• (a) “Why…was written…” में helping verb (was) के बाद word order awkward/less correct (standard form is “Why was…?”).
• (b) helping verb missing (“was/were” नहीं है) → sentence incomplete.
• (c) wrong placement makes the sentence unnatural; (d) is the correct standard form.
Hence, option (d) is the correct answer.