The correct option is C 12CV2
Before closing switch S,2C and 3C connected in series across the cell. C is not in the circuit .
∴1Ceff=12c+13c
Ceff=6C5
∴ Initial energy (Ei)=12(Ceff)V2
=12(6C5)V2
=3CV25
After closing switch S , capacitor C and 6C5 will be in parallel
∴C'eff=6C5+c
=11C5
∴ Final energy (Ef)=12(C'eff)V2
=12(11C5)(V2)
=11CV210
after closing the switch, charge flow through cell = charge on capacitance C=q1
q1=CV
work done by cell Wcell=q1V=CV2
From energy balance
Ei+Wcell=Ef+heat loss
Heat loss =Wcell+Ei−Ef
=CV2+3CV25−11CV210
=12CV2
Hence, option (c) is correct.