六级指针小试牛刀

时间:2014-05-02 04:44:13   收藏:0   阅读:219
#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");
}

六级指针小试牛刀,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!