Option (D) is correct.
Explanation: Two entries in Z's row show that it is a non-metal:
- Its oxide turns blue litmus red, so the oxide is acidic, and acidic oxides are formed by non-metals. This is the decisive test.
- It shatters when hammered. Non-metals are brittle, whereas metals are malleable.
Yet Z conducts electricity and is shiny, which looks like metallic behaviour. Z is graphite, a form of carbon. Graphite is the exception among non-metals: it is a conductor of electricity.
The other three elements:
| Element | What it is | Why |
|---|
| W | a typical metal (e.g. magnesium) | conducts, malleable, basic oxide |
| X | a typical non-metal (e.g. sulphur) | dull, brittle, does not conduct, acidic oxide |
| Y | a metal with an amphoteric oxide (e.g. aluminium or zinc) | conducts, malleable, oxide reacts with both acid and base |
Physical properties are only a rough guide and have exceptions, but the nature of the oxide is a reliable test: judged by its oxide, Z is a non-metal.
Option (A) is wrong: W is a metal; its oxide turns red litmus blue, so it is basic, and W is malleable.
Option (B) is wrong: X is a non-metal, but it does not conduct electricity.
Option (C) is wrong: Y is malleable and its oxide is amphoteric, which marks it as a metal (such as aluminium or zinc), not a non-metal.

Basic, amphoteric and acidic oxides compared: the test that separates a metal from a non-metal.