栈的属性和buff的地址

//栈的开口向上向下,测试release.....

//一般认为:栈开口向下

//不管栈开口向上还是向下,buf的内存地址buf+1,永远是向上的......

#include <iostream>
#include <string>
using namespace std;

int main()
{
	int a;
	int b;
	int c;
char buf[128];  //静态里面的时候  buf所代表的内存空间的标号 就已经定义下来了。。。。
	cout << hex << &a << endl;
	cout << hex << &b << endl;
	cout << hex << &c << endl;
	return 0;
}

//示意图

猜你喜欢

转载自blog.csdn.net/weixin_41983807/article/details/87886425