int myInt;
cout << myInt; // Garbage like 429948, etc
If I output and/or work with uninitialized variables in C++, what are their assumed val
the integer is a variable on the stack since it is a local variable. As long as it has not been initialized, the data on the stack is as-is. It is (part of) a previously used data. So it is garbage, but it is not random since given the executable and a begin state, the value is predictable. Predicting is hard since you have to take into the account the OS, the compiler, etc and moreover it is very pointless.