궁금증;

#include <iostream>
using namespace std;

int fv()
{
int x = 1;
cout << "address of x in fv() : " << &x << endl;

return x;
}

int* fp()
{
int x = 1;
cout << "address of x in fp() : " << &x << endl;

return &x;
}

int& fr()
{
int x = 1;
cout << "address of x in fr() : " << &x << endl;

return x;
}

int main()
{
int v = fv();
cout << "v = fv() : " << v << endl;
int* p = fp();
cout << "*p = fp() : " << *p << endl;
int r = fr();
cout << "r = fr() : " << r << endl;
}



컴파일해서 실행시켜보면,
address of x in fv() : 0xbfaef554
v = fv() : 1
address of x in fp() : 0xbfaef554
*p = fp() : 1
address of x in fr() : 0xbfaef554
r = fr() : 1



local 변수인 x의 address값이 동일하게 나온 이유는?