carbon ions, with and without K-shell vacancies, were measured using a windowless Si(Li) x-ray detector with a full-width-at-half-maximum resolution of 135 eV at 5.9 keV. Carbon ions of different charge states were produced using a postacceleration, nitrogen gas stripping cell. The carbon ions were then magnetically analyzed to select the desired charge state and energy before entering the target chamber. The total M-shell and Ms, Mn, P, and M y x-ray cross sections were measured. The electron-capture (EC) contributions as well as the direct-ionization (DI) contributions can be determined by making a comprehensive study of the projectilecharge-state dependence of the target x-ray production cross sections for targets in which the single-collision realm is maintained. In this paper, both EC and DI contributions and the total M-shell x-ray production cross sections are compared to both the first Born theory and to the perturbed-stationary-state theory with energyloss, Coulomb-deflection, and relativistic corrections. PACS number(s): 34.70.+e, 34.50.Fa