Chemical abundances of 1111 FGK stars from the HARPS GTO planet search
  program IV. Carbon and C/O ratios for Galactic stellar populations and planet
  hosts
  [ABRIDGED]We study the carbon abundances with a twofold objective. On the one
hand, we want to evaluate the behaviour of carbon in the context of Galactic
chemical evolution. On the other hand, we focus on the possible dependence of
carbon abundances on the presence of planets and on the impact of various
factors (such as different oxygen lines) on the determination of C/O elemental
ratios. We derived chemical abundances of carbon from two atomic lines for 757
FGK stars in the HARPS-GTO sample. The abundances were derived with the code
MOOG using automatically measured EWs and a grid of Kurucz ATLAS9 atmospheres.
Oxygen abundances, derived using different lines, were taken from previous
papers in this series and updated with the new stellar parameters. We find that
thick- and thin-disk stars are chemically disjunct for [C/Fe] across the full
metallicity range that they have in common. Moreover, the population of
high-$\alpha$ metal-rich stars also presents higher and clearly separated
[C/Fe] ratios than thin-disk stars up to [Fe/H]\,$\sim$\,0.2\,dex. The [C/O]
ratios present a general flat trend as a function of [O/H] but this trend
becomes negative when considering stars of similar metallicity. We find
tentative evidence that stars with low-mass planets at lower metallicities have
higher [C/Fe] ratios than stars without planets at the same metallicity, in the
same way as has previously been found for $\alpha$ elements. Finally, the
elemental C/O ratios for the vast majority of our stars are below 0.8 when
using the oxygen line at 6158A however, the forbidden oxygen line at 6300A
provides systematically higher C/O values. Moreover, by using different
atmosphere models the C/O ratios can have a non negligible difference for cool
stars. Therefore, C/O ratios should be scaled to a common solar reference in
order to correctly evaluate its behaviour.
