All Nikon digital cameras use the F mount system. Whatever Nikon lenses you buy will fit on any digital Nikon camera.
Won't pre-Ai lenses screw up DSLRs?
1) I am planning to buy D5100 and in future I also want to buy D5200 - If I buy additional lenses for D5100 - in future will I be able to use those lenses for D5200 also ?
2) Usually all nikon lenses are compatible with all models ? or each model has different lenses ?
What good lenses I can buy for D5100 that are compatible with D5200 also ?
If you get the D5100 your next choice of camera should be the D7100. Not really enough difference in the D5100 and the D5200. Or better yet just start with the D5200 and then add the D7100 as your second camera.