  We present results on rapidity and transverse momentum distributions of
inclusive charm quark production in hadronic and heavy-ion collisions at RHIC
and LHC energies, including the next-to-leading order, $O(\alpha_s^3)$,
radiative corrections and the nuclear shadowing effect. We determine the
hadronic and the {\it effective} (in-medium) K-factor for the differential and
total inclusive charm cross sections. We find the fraction of central and
inelastic events that contain at least one charm quark pair at LHC energies and
obtain the effective $A$-dependence of the inclusive charm production in
proton-nucleus and nucleus-nucleus collisions at RHIC and in nucleus-nucleus
collisions at the LHC. We discuss theoretical uncertainties inherent in our
calculation. In particular, we show how different extrapolations of gluon
density in a nucleon {\em and} in a nucleus to the low-$x$ region introduce
large theoretical uncertainty in the calculation of charm production at LHC
energies.
