{ char p[]=”hello world”;
return p;
}
void test(void)
{
char *str=null;
str=Getmemory();
printf(str);
} 请问运行 Test 函数会有什么样的结果.
[主观题]char*getmemory(void){ char p[]=”hello world”;return p;}void test(void){char *str=null;str=Getmemory();printf(str);} 请问运行 Test 函数会有什么样的结果.
[主观题]char *GetMemory(void){ char p[] = "hello world";returnp; }void Test(void){char *str = NULL;str = GetMemory(); printf(str);}请问运行 Test 函数会有什么样的结果?
[主观题]char *GetMemory(void){ char p[] = "hello world";returnp; }void Test(void){char *str = NULL;str = GetMemory(); printf(str);}请问运行 Test 函数会有什么样的结果?
[主观题]void GetMemory(char *p){p = (char *)malloc(100);}void Test(void) {char *str= NULL;GetMemory(str); strcpy(str, "hello world");printf(str);}请问运行 Test 函数会有什么样的结果?
[主观题]Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}voidTest(void){char *str = NULL;GetMemory(&str, 100);strcpy(str, "hello"); printf(str); }请问运行Test 函数会有什么样的结果?
[主观题]有关内存的思考题1. void getmemory(char *p){ p=(char*)mallol(100);}void test(void){char * str =null;getmemory(str);strcpy(str,”hello,world”);printf(str);}请问运行 Test 函数会有什么样的结果
[主观题]char str[ ]= "Hello";char *p=str;int n=10;sizeof(str)=( )sizeof(p)=( )sizeof(n)=( )void func(char str[100]){ }sizeof(str)=( )
[主观题]char str[ ]= "Hello";char *p=str;int n=10;sizeof(str)=( )sizeof(p)=( )sizeof(n)=( )void func(char str[100]){ }sizeof(str)=( )
[单选题]有以下程序:void funl(char*p){ char*q;q=P;while(*q!=\O){(*q)++;q++;}}main{ char a[]={"Program"),*P;p=&a[3];funl(p);printf("%s\n",a);}程序执行后的输出结果是( )。A.ProhsbnB.PrphsbnC.ProgsbnD.Program
[单选题]若有如下程序: void a(char*p,char c) {while(*p) { if(*p==c)*p=c-'b'+'B';; p++; } } main() {char s[50]="abcdeeffgee",b='e'; a(s,b);printf("%s/n",s); } 则程序运行后的输出结果是( )。A.AbcdeeffgeeB.ABCDeeFFGeeC.abcdEEffgEED.ABCDEEFFGEE