int x = 5; void foo() { int x = 10; cout << x << " "; } void bar() { cout << x << " "; } int main() { foo(); bar(); }
5 5
10 10
5 10
10 5