以下选项中有语法错误的是A) char *str[ ]={”guest”};B) char str[ ][10]={”guesi”};C) char *st[3]; str[1]=”guest”;D) char str[3][10]; str[1]=”gest”;

以下选项中有语法错误的是

A) char *str[ ]={”guest”};

B) char str[ ][10]={”guesi”};

C) char *st[3]; str[1]=”guest”;

D) char str[3][10]; str[1]=”gest”;


相关考题:

以下程序的输出结果是 _[13]_______ .#include stdio.h#include string.hchar *fun(char *t){ char *p=t;return(p+strlen(t)/2);}main(){ char *str="abcdefgh";str=fun(str);puts(str);}

以下选项中有语法错误的是()A.charstr[10]={“guest”};B.char*str[3]*str[1]={“guest”};C.charstr[3][10];str[1]={“guest”};D.charstr[3][10];str[1]={“guest”};

以下程序的输出结果是【 】。includeincludechar*fun(char*0{ char *p--t;retur 以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *0{ char *p--t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}

下列程序的输出结果是______。 char*fun(char*str,int n) { int i; char*p=str; for(i=0;i<10;i++,str++) *str='a'+i; return++p; } main() { char a[10]; printf("%s\n",fun(a,10)); }A.ABCDEFGHIJB.abcdefghijC.bcdefghijD.不确定的值

下面的程序各自独立,请问执行下面的四个TestMemory 函数各有什么样的结果?①void GetMemory(char * p){p = (char * )malloc(100);}void TestMemory (void){char *str = NULL;GetMemory (str);strcpy(str, "hello world");prinff(str);}② char * GetMemory (void){char p[ ] = "hello world";return p;}void TestMemory (void){char * str = NULL;str = GetMemory( );printf(str);}③void GetMemory(char * * p, int num){* p = (char * )malloc(num);}void TestMemory (void){char * str = NULL;GetMemory(str, 100);strcpy( str, "hello" );printf(sir);}④void TestMemory (void){char *str = (char * )malloe(100);strepy (str, "hello" );free ( str );if(str ! = NULL){strepy( str, "world" );printf(str);}}

以下选项中有语法错误的是( )。A.char*str[]={"guest");B.char str[][lO]={"guest");C.char*str[3];str[t]="9uest";D.char str[3][lO];str[1]="guest";

以下程序的输出结果是【 】。includeincludechar*fun(char*t){ char *p=t;retur 以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *t){ char *p=t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}

以下程序的输出结果是_[13]_______#include stdio.h#include string.hchar *fun(char *t){ char *p=t;return(p+strlen(t)/2);}main(){ char *str="abcdefgh";str=fun(str);puts(str);}

下列初始化字符数组的语句,正确的是()。A.char[] str = {'h', 'e', 'l', 'l', 'o'};B.char[5] str = "hello";C.char[5] str = {"hi"};D.char[100] str = "";