#include <iostream>
using namespace std;
void process(int *a)
{
a=(int*)realloc(a,sizeof(int)*4);
a[3]=3;
}
int main()
{
int *a;
a=(int*)malloc(sizeof(int)*3);
a[0]=0;
a[1]=1;
a[2]=2;
process(a);
for (int i=0;i<4;i++)
cout<<a[i]<<"";
cout<<endl;
system("pause");
free(a);
return 0;
}