We calculate cross section for production of D mesons and Λ c baryons in proton-proton collisions at the LHC. The cross section for production of cc pairs is calculated within k T -factorization approach with the Kimber-Martin-Ryskin unintegrated gluon distributions obtained on the basis of modern collinear gluon distribution functions. We show that our approach well describes the D 0 , D + and D s experimental data. We try to understand recent ALICE and LHCb data for Λ c production with the c → Λ c independent parton fragmentation approach. The Peterson fragmentation functions are used. The f c→Λ c fragmentation fraction and ε Λ c parameter for c → Λ c are varied. As a control plot we show transverse momentum distribution of different species of D mesons assuming standard values of the f c→D fragmentation fractions known from the literature.The fraction f c→Λ c neccessary to describe the ALICE data is much larger than the average value obtained from e + e − or ep experiments. No drastic modification of the shape of fragmentation function is allowed by the new ALICE and LHCb data for Λ c production. We also discuss a possible dependence of the Λ c /D 0 baryon-to-meson ratio on rapidity and transverse momentum as seems observed recently by the ALICE and LHCb collaborations. Three different effects are considered: the value of ε Λ c parameter in Peterson fragmentation function for c → Λ c , a kinematical effect related to the hadronization prescription and a possible feed-down from higher charmedbaryon excitations. It seems very difficult, if not impossible, to understand the ALICE data within the considered independent parton fragmentation scheme.