Strange behavior when connecting ideal voltage-source and capacitor in series?
At the time of switch-on the charge on the capacitor is zero and the voltage across it is zero.

After switch-on the charge on the capacitor is still zero (and the voltage across it is still zero). At this point, however, the left side of the capacitor has risen to 1 V so the right side must also.

The situation changes if you add a resistor to the Vout terminals. The right side of the capacitor will jump up with the left side but will discharge to 0 V at a rate determined by R x C. The final state will be 1 V across the capacitor.