Given, A and B are inputs and C is output.
Assume that some voltage is applied across AB,
If the voltage is positive, then diode corresponding to A will be on and the other diode will be off
⇒C=A
If the voltage is negative then diode corresponding to B will be on and the other diode will be off
⇒C=B
Therefore we can say that C=AorB
Therefore it acts like OR gate.
So the correct option is D.