#include <iostream>
#include <string>
using namespace std;
int main()
{
char a=1;
char b=2;
char c=3;
char d=4;
cout<<"(int)(&) = "<<(int)(&a)<<endl;
cout<<"(int)(&b) = "<<(int)(&b)<<endl;
cout<<"<(int)(&c) = "<<(int)(&c)<<endl;
cout<<"(int)(&d) = "<<(int)(&d)<<endl<<endl;
return 0;
#include <string>
using namespace std;
int main()
{
char a=1;
char b=2;
char c=3;
char d=4;
cout<<"(int)(&) = "<<(int)(&a)<<endl;
cout<<"(int)(&b) = "<<(int)(&b)<<endl;
cout<<"<(int)(&c) = "<<(int)(&c)<<endl;
cout<<"(int)(&d) = "<<(int)(&d)<<endl<<endl;
return 0;
}
debug版本从高地址开始分配变量
release版本从低地址开始分配变量