I have encountered the following code:
#include using namespace std; int i = 1; int main(int argc,char ** argv) { int i = i; cout&l
int main() { int i=i; return 0; }
is correct.
So in your program, the global i is ignored when the local i is encountered and it is initialized to itself. You'll get a garbage value as a result.
i