Carbon have 4 valence electron
The electron configuration of C is : 1s2 2s2 2ps
the outer most s and p orbital contains 4 electrons and these are the valence electron of C atom
Key: to determine the valence electron of an element, you have to refer to the group it is located in, in the periodic table. (C is in group 4 (or 14) so VE = 4)
hope its clear enough