Solvent effects on the electronic spectrum of C