The nonmetals in Group 4 of the periodic table, such as carbon and silicon, typically form bonds by sharing valence electrons with other nonmetals. This sharing leads to the formation of covalent bonds.
So, the correct answer is:
By sharing valence electrons with other nonmetals.