Which electronic component allows alternating current (AC) to flow but prevents direct current (DC) flowing?

A resistor
A capacitor
A transistor.
An inductor