首页 > 代码库 > 六级指针小试牛刀

六级指针小试牛刀

#include<stdio.h>
void f(char *******p)
{
	char *str1 = "abc";
	char *temp = NULL;
	temp = (char *)malloc(10*sizeof(char));
	memset(temp, 0, 10);
	strcpy(temp, str1);
	//*temp = 10;
	*p = temp;
}
void main()
{
	char ******p1=NULL;
	char *******p2=NULL;

	p2 = &p1;
	f(p2);
	printf("%s", p1);
	system("pause");
}