Step 1: Conceptual Understanding:
The question describes a device that permits current flow in only one direction. It permits current when connected to a battery with a specific polarity but impedes current flow when the polarity is reversed. This defines a rectifying device.
Step 2: Detailed Analysis:
Let's examine the behavior of each listed device:
1. p-type semiconductor / 2. n-type semiconductor:
These are resistive materials that adhere to Ohm's law, conducting current irrespective of voltage direction. Reversing polarity merely reverses current direction without altering magnitude. They do not fit the described behavior.
3. p-n junction diode:
A p-n junction diode is engineered for unidirectional current flow. In forward-bias (p-side positive), it exhibits low resistance and conducts significant current. In reverse-bias (p-side negative), it has high resistance, reducing current to near zero. This precisely matches the problem's description.
4. capacitor:
When connected to a DC battery, a capacitor experiences a transient charging current until fully charged, after which current ceases. Polarity reversal causes a transient discharge and subsequent recharge current in the opposite direction, eventually stopping. It does not maintain steady current in one direction while blocking it in the other.
Step 3: Conclusion:
Device X, which allows current in one direction and blocks it in the reverse direction, is a p-n junction diode.

