So my truck had an emissions leak for the longest time therefore the check engine light was on and I had a code on it. I just replaced some parts on the truck and the check engine light turned off. With the check engine light off is the code cleared as well?
If you're worried about the car passing emissions testing, seeing the check engine light go off is a good sign. Where I live, you can't be failed because the light used to be on.
The status of the code (often showing up as a check engine light) depends on the computer in the car. Obviously, if the light is on, the code is active. Quite often, though, the record of a previous code is still in a buffer. This can be useful if you're trying to diagnose more complex but intermittent problems.
In short, it depends.