The question that needs to be written in passive voice is: 'Have you painted it?'
A sentence is in the active voice when the subject performs an action. In this sentence, 'you' performs the action 'painted' in the interrogative.In passive voice, the subject receives the action. So, the object now becomes the subject.
The object 'it' refers to the room, hence the sentence will turn to:
Has + subject (the room) + verb (painted) + by + object (you).
Has it/the room been painted by you?
Option C: This can be seen in option C, hence it's the correct option.
Option A: This sentence is the same as the given one, only 'it' has changed to 'the room'. The sentence is still in active voice.
Option B: This sentence, too, is in the active voice. 'You' performs the action 'paint'.
Option D: The verb 'was' refers to past perfect tense, whereas the sentence is in the present perfect.
While changing from active to passive (or vice versa) we do not change the tense of the sentence. We simply change the voice.
Hence options A, B and D are incorrect.