标签:
#include<iostream>
using namespace std;
void main()
{
int i, j;
int s[] = { 1, 2, 3 };
int *temp = new int[5];
temp = s;
for (i = 0; i < 5; i++)
{
cout << temp[i] << endl;
}
temp[3] = 9;
temp[4] = 10;
for (i = 0; i < 5; i++)
{
cout << temp[i] << endl;
}
}
数组首地址和指针的关系?
标签:
原文地址:http://www.cnblogs.com/Cherrylalala/p/5093106.html