I have encountered the following code:
#include<iostream>
using namespace std;
int i = 1;
int main(int argc,char ** argv)
{
int i = i;
cout<<i<<endl; // which i?
return 0;
}
It can pass the compile, but gives the wrong answer, how to explain this?