南京私立妇产科排名:请教(关于指针)
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/03 07:03:55
//程序代码如下:
#include "iostream.h"
int main()
{
int a[2][3]={ 1, 2, 3, 4, 5, 6 };
cout << "&a:\t" << &a << endl;
cout << "a:\t" << a << endl;
cout << "*a:\t" << *a << endl;
return 0;
}
//程序的运行结果是:
// &a: 0x0012FF68
// a: 0x0012FF68
// *a: 0x0012FF68
// Press any key to continue
#include "iostream.h"
int main()
{
int a[2][3]={ 1, 2, 3, 4, 5, 6 };
cout << "&a:\t" << &a << endl;
cout << "a:\t" << a << endl;
cout << "*a:\t" << *a << endl;
return 0;
}
//程序的运行结果是:
// &a: 0x0012FF68
// a: 0x0012FF68
// *a: 0x0012FF68
// Press any key to continue