Generalization of a Theorem of Carlitz