比如定义了这样的一个函数
void test() {
std::cout << "---test stack---" << std::endl;
int a = 2019;
char ch[] = "qwerty";
int b = 2020;
char c='c';
std::cout << "---test stack end---" << std::endl;
}
为什么我通过打印各个变量的地址发现,变量在栈中的地址不是按照a,ch,b,c定义的顺序入栈的,更像是系统自动重新分配了各个变量在栈中的位置,这是为啥