This question may seem naive (hell, I think it is), but I cannot find an answer that satisfies me.
Take this simple C ++ program:
#include<iostream> using namespace std; int main () { bool b; cout << b; return 0; }
When compiling and executing, it always prints 0 .
The problem is that this is not what I expect from it: as far as I know, a local variable does not matter initialization, and I believe that a random byte is more likely to be different than 0 .
What am I missing?
source share