A carbon atom forms bonds with other atoms by valence electrons in order to attain a stable configuration.