Suppose a capacitor is charging and its input voltage decreases say 5%? What will happen to capacitor voltage?
What will happen when capacitor is fully charged and iput voltage is decreased?
The capacitor tries to match the voltage connected to it, it the voltage is higher the capacitor charges, if the voltage is lower the capacitor discharges.