We present a systematic study of the properties of pure hadronic and hybrid compact stars . The nuclear equation of state ( EoS ) for \beta -equilibrated neutron star matter was obtained using density dependent effective nucleon-nucleon interaction which satisfies the constraints from the observed flow data from heavy-ion collisions . The energy density of quark matter is lower than that of this nuclear EoS at higher densities implying the possibility of transition to quark matter inside the core . We solve the Einstein ’ s equations for rotating stars using pure nuclear matter and quark core . The \beta - equilibrated neutron star matter with a thin crust is able to describe highly massive compact stars but find that the nuclear to quark matter deconfinement transition inside neutron stars causes reduction in their masses . Recent observations of the binary millisecond pulsar J1614-2230 by P. B. Demorest et al . [ 1 ] suggest that the masses lie within 1.97 \pm 0.04 M _ { \odot } where M _ { \odot } is the solar mass . In conformity with recent observations , pure nucleonic EoS determines that the maximum mass of NS rotating with frequency below r-mode instability is \sim 1.95 M _ { \odot } with radius \sim 10 kilometers . Although compact stars with quark cores rotating with Kepler ’ s frequency have masses up to \sim 2 M _ { \odot } , but if the maximum frequency is limited by the r-mode instability , the maximum mass \sim 1.7 M _ { \odot } turns out to be lower than the observed mass of 1.97 \pm 0.04 M _ { \odot } , by far the highest yet measured with such certainty , implying exclusion of quark cores for such massive pulsars . PACS numbers : 26.60.-c , 21.65.Cd , 21.65.Ef , 26.60.Kp , 12.38.-t , 12.39.-x , 21.65.Qr