Most DSLRs get the focal length from the electronics within the lens, however, most cameras do not display this information until after the shot. All lens manufacturers display some type of focal length information marked on the zoom ring. Most of these markings are only approximations of the true focal length and do not take into account the crop-factor of dx type sensors. So how can we be sure our lens is set to a “normal” focal length?

Check out the answer at Digital Photography School