在下面的代码中,我想知道为什么分配的顺序是“c,b,a”而不是“a,b,c”,正如我从变量的地址中看到的那样
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cout << "address a: " << &a << '\n';
cout << "address b: " << &b << '\n';
cout << "address c: " << &c << '\n';
return 0;
}
输出如下:
address a: 0x28fefc
address b: 0x28fef8
address c: 0x28fef4
Process returned 0 (0x0) execution time : 0.056 s
Press any key to continue.