Quick question. If I have a global variable and a local variable with the same name and I use the variable which is used? Does the local variable take precedence or the global variable. Is 50 or 100 printed from the example below?

Code:
int x = 50;
void foo()
{
  int x = 100;
  cout<<x;
}