If I don't initialize a C++ variable, I find that it automatically gives it 0 on some android phones, but not on others, and zero on all IOS phones. So what determines whether you give it 0, is it the phone system, is it the compiler, is it some compiler option
What determines the initial value of C++ variables
If I don't initialize a C++ variable
I assume you refer to automatic storage. Variables in static or thread local storage are zero initialised implicitly.
From perspective of the language: The initial value is simply indeterminate. Whether anything affects this value indirectly is unspecified. The behaviour of reading an indetrminate value is in most cases undefined.
In practice: It is typically determined by whatever happens to be in the memory before it was allocated for the variable.
is it some compiler option
Perhaps, or maybe not. It's impossible to tell without seeing the compiler and options that were used.
I know that people have experimented with a compiler feature that initialises uninitialised variables, but I don't know of an official mainstream compiler release with such option. That doesn't mean it doesn't exist.