Explanation: Carbon is an element with atomic number of 6 and thus contains 6 electrons. The electrons are filled in order of increasing energies and follows Afbau's rule.The electrons are singly filled first in each orbital having same spin, then only pairing occurs. This rule was known as Hund's Rule.
The valence electrons are the electrons which are present in last shell. Thus valence electrons are 4, two in s and 2 in p orbitals.