Stellar evolution

Why is a white dwarf left by a typical intermediate-mass star usually composed mainly of carbon and oxygen?