How Does An Atom Of Carbon Attain Noble Gas Configuration?

How Does An Atom Of Carbon Attain Noble Gas Configuration? Carbon has four electrons in its valence (outermost) shell orbital. So, it can neither accept nor gain four electrons. So it completes its octet is by sharing of electrons. Thus, carbon forms covalent bonds to complete its octet or attain the noble gas configuration. How