A characterization of continuously codifferentiable functions and some consequences