  In a leading order pQCD model, we have studied the heavy flavor production in
p+p collisions at RHIC and LHC energy. Leading order pQCD models require a
K-factor. At RHIC energy, $\sqrt{s}$=200 GeV, we fix K such that the model
reproduces the integrated charm yield, $dN^{c\bar{c}}/dy$, estimated by the
STAR and the PHENIX collaboration in p+p collisions. The model then explains
the STAR data on the transverse momentum distribution of open charm mesons
$(D^0)$ and decay electrons in p+p collisions. The p+p predictions, scaled by
the number of binary collisions, also explain the electron spectra in STAR p+d
collisions and PHENIX Au+Au collisions in different centrality bins. Assuming
that at LHC energy K-factor is of the order of unity, we have used the model to
predict the transverse momentum distribution of $D$ and $B$ mesons and also of
electrons from semileptonic decay of $D\to e$ and $B\to e$, in p+p collisions
at LHC energy, $\sqrt{s}$=14 TeV.
