In the following code, I am wondering why the order of allocation is "c, b, a" and not "a, b, c", as I can see from the variables' adresses
#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;
}
The output is the following:
address a: 0x28fefc
address b: 0x28fef8
address c: 0x28fef4
Process returned 0 (0x0) execution time : 0.056 s
Press any key to continue.