#include <iostream.h>//数组名为常指针,与数组第一个元素地址相同
void main()
{
int k[10];
cout<<"k="<<k<<endl; //k=0x0012FF20
for(int i=1;i<=10;i=i+1){k[i-1]=i;}
cout<<"k="<<k<<" *k="<<*k<<endl;//k=0x0012FF20 *k=1
cout<<"&k[0]="<<&k[0]<<" k[0]="<<k[0]<<endl;//&k[0]=0x0012FF20 k[0]=1
char * p="abcd";
cout<<"p="<<p<<" *p="<<*p<<endl; // p=abcd *p=a
char q[10]="wert";
cout<<"q="<<q<<" *q="<<*q<<endl; //q=wert *q=w
}
void main()
{
int k[10];
cout<<"k="<<k<<endl; //k=0x0012FF20
for(int i=1;i<=10;i=i+1){k[i-1]=i;}
cout<<"k="<<k<<" *k="<<*k<<endl;//k=0x0012FF20 *k=1
cout<<"&k[0]="<<&k[0]<<" k[0]="<<k[0]<<endl;//&k[0]=0x0012FF20 k[0]=1
char * p="abcd";
cout<<"p="<<p<<" *p="<<*p<<endl; // p=abcd *p=a
char q[10]="wert";
cout<<"q="<<q<<" *q="<<*q<<endl; //q=wert *q=w
}