C语言在子函数中调用malloc申请内存出现段错误
#include <stdio.h>#include <malloc.h>#include <string.h>void test(char *p) { p = (char*)malloc(10 * sizeof(char)); strcpy(*p, "123456789" ); }void main(){ char ...