Its does not depend on multiple files and its just a matter of knowing what is the scope of a variable.

Try running this program
Code:
#include <iostream>
using namespace std;

int iTemp = 10;

FuncLocal()
{
    int iTemp; // Declare the variable once again
    iTemp = 100;
}
FuncGlobal()
{
    iTemp = 1000;
}

int main()
{
    cout << iTemp<<endl;
    FuncLocal();
    cout << iTemp<<endl;
    FuncGlobal();
    cout << iTemp<<endl;
    return 0;
}
What should be the output of the program?