考考大家4^_^
提示: 作者被禁止或删除 内容自动屏蔽
2011-07-09 12:13
2011-07-09 12:33
2011-07-09 12:43
程序代码:#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void getmemory(char **p)
{
*p=(char *) malloc(100);
strcpy(*p,"hello world");
}
int main( )
{
char *str=NULL;
getmemory(&str);
printf("%s/n",str);
free(str);
return 0;
}
没有缩进的代码很难看啊。。。。。
2011-07-09 12:45
2011-07-09 12:57
、要输出hello world干嘛要这么烦啊。
2011-07-09 16:07
2011-07-09 16:14
2011-07-09 18:43
2011-07-10 09:41
2011-07-10 09:54