试题6:void GetMemory(char **p, int num ){*p = (char *) malloc(num );}void Test(void ){c
试题6:
void GetMemory(char **p, int num )
{
*p = (char *) malloc(num );
}
void Test(void )
{
char *str = NULL;
GetMemory(&str, 100 );
strcpy(str, "hello" );
printf(str );