Relativistic mean-field study of exotic carbon nuclei