Who knows that the local i_local value in this example is initialized to the zero value http://ideone.com/Cqer9Z ?
#include <iostream>
using namespace std;
int main() {
int i_local;
cout << "Value of i_local: " << i_local << endl;
}
This is a variable with automatic storage time and should have an undefined value according to the standard.
In my local computer (C ++ 11) it is not defined, but in ideone (C ++ 14) it is reset.
zim32 source
share