I think this is fine, as long as you contact the university and update your schedule. Of course, it’s kinda like getting a C, changing one or two classes isn’t a problem, but changing several (or changing out of a critical program) would be.
For example, at most schools, switching out of Calc BC into Calc AB isn’t a problem, but at others, switching out of a 2nd or 3rd year of a language would be.