问题
I knew what is stack and heap, but when I did some experiments on this topic, I found something surprising.
int i,j;
std::cout<< &i << "\n";
std::cout<< &j << "\n";
Results:
0x7a893a29e5b8
0x7a893a29e5bc
That means stack is toward to high address, and not to low address which is shown by below graph.
来源:https://stackoverflow.com/questions/61540247/stack-and-heap-about-memory-address-question