Define integer variable x
According to the regulations, all variables in the program must have values (initialization) before they can be used. For example, the variable to the right of the assignment number. There is a simple reason. If you want to calculate how much a+b is equal to, of course, let a and b have initial values first, otherwise no one knows how much a+b is equal to.

For uninitialized cells, the value of each bit is not fixed and may be 1 or 0, depending on the result of the last address used.

Whether the global integer variable is 0 before initialization depends on the compiler. Some compilers may have completed the "clean-up" and some may not have completed it.

Get into the good habit of "initializing variables before use".