Carbon-12 is an isotope of carbon having an atomic mass number of 12.
The atomic number of carbon is 6. The number of protons is equal to the atomic number, hence protons = 6.
The number of protons is equal to the number of electrons in a neutral atom. Hence, carbon-12 has six electrons in it.
Mass number = no. of protons + no. of neutrons
Hence, no. of neutrons = 12 - 6 = 6