Measurement of the charm structure function and its role in scale noninvariance