In c++, I thought that all variables are stored in stack memory, starting from higher addresses and going towards 0x0. Why it's not working here ? I am getting 0x7fff67225e90 for the address of x and 0x7fff67225e94 for the address of z.
int main(){
int x = 7;
std::cout<<"x in main(): "<<x<<std::endl;
std::cout<<"&x in main(): "<<&x<<std::endl;
//foo();
int z = 8;
std::cout<<"z in mai(): "<<z<<std::endl;
std::cout<<"&z in main(): "<<&z<<std::endl;
return 0;
}