capacitor and inductor both are used only in case of ac. For dc. capacitor acts to be open circuit, so have no use at all.
capacitor stores charge and produces leading power factor.
inductor...