Can you have a capacitor output a higher voltage than what battery is attached to that circuit?
When you have absorbed all the information about capacitors you have been linked to and perhaps worked through some electronics tutorials, there are many on the net, you will be ready for some capacitor magic:
Imagine you connect a capacitor accross a battery. The capacitor will get charged up to the battery voltage.
When you disconnect the capacitor it will maintain that charge for some time and you can measure the same battery voltage across it's terminals.
Now connect just one lead of the capacitor to one terminal of the battery. Specifically connect the lead that was on the negative battery terminal to the positive battery terminal.
Now measure the voltage from the negative battery terminal to the free lead of the capacitor.
You will find it is twice the battery voltage. Magic!
Of course there are electronic circuits that do this capacitor switching for you. They are called charge pumps.
Memory in C++ is a leaky abstraction .