为什么地址相差4
程序——#include<iostream>
using namespace std;
void main()
{
char str[]={"hello!"};
char *p=str;
cout<<p<<endl;
cout<<str<<endl;
cout<<&p<<endl;
cout<<&str<<endl;
}
p和str输出结果一致,为hello!
可&p和&str的输出结果却相差4。
哪位高手能给指点一下。谢谢!
如果觉得可以给我点分
