Step-by-step explanation:
I don't know what's wrong with your code, because I can't see the whole code.
What happens is that the value 3 is written into the variable x, and later that value is deleted and the value 4 is written in x.
Think of variables as a place in memory to store a value.
Is that C?