Basic Coding question on variables

Global variables get initialized to 0 when they are declared without a value. Local variables don't come with that guarantee and should always be initialized when they are created otherwise they may contain some junk value.