下列字符数组的初始化,正确的是( )。A.char ch[5]={"a","b","c","d","e"};B.char ch[]={'a','b'};C.char ch[15]={"welcome to china"};D.char ch[14]={"I am a student"};
下列字符数组的初始化,正确的是( )。
A.char ch[5]={"a","b","c","d","e"};
B.char ch[]={'a','b'};
C.char ch[15]={"welcome to china"};
D.char ch[14]={"I am a student"};
相关考题:
下列程序段中,不能正确赋值的是( )。A.char*p,ch; p=Ch; scanf("%c",p);B.char*p; p=char*)malloc(1); scanf("%c",p);C.char*p; *p=getchar();D.char*p,ch; p=ch; *p=getchar();
下列程序段中,不能正确赋值的是( )A.char*p,ch; p=ch; scanf("%c",p);B.char*p; p=(char*)malloc(1); scanf("%C",p);C.char*p; *p=getchar();D.char*p,ch; p=ch; *p=getchar();
下列程序段中,不能正确赋值的是A.char * p,ch; p=ch; scanf("%c,p")B.char * p; p=(char*)malloc(1) scanf("%c",p);C.char *p *p=getchar( );D.char *p,ch; p=ch; *p=getchar( );
下列程序段中,不能正确赋值的是( )。A.char*p,ch; p=ch; scanf ("%c",p);B.char*p; p=(char*)malloc(1); scabf("%c",p);C.char*p; *p=getchar();D.char*p,ch; p=ch; *p=getchar();
下列程序段中,不能正确赋值的是A.char*p,ch; p=ch; scanf("%c,p")B.char*p; p=(char*)malloc(1); scanf("%c",p);C.char*p; *p=getchar();D.char*p,ch; p=缸h; *p=getchar();
若有char ch[10],则下列字符串数组的赋值中不正确的是( )。A.ch="welcome";B.ch[0]='w';C.strcpy(ch,"welcome");D.char ch1[]="welcome";strcpy(ch,ch1);
下列程序段中,不能正确赋值的是( )。A.char*p,ch; p=ch; scanf("%c",p);B.char*p; p=(char*)malloc(1); scanf("%c",p);C.char*p; *p=getchar();D.char*p,ch; p=ch; *p=getchar();
下列初始化字符数组的语句中,正确的是()。A.char str[5] = "hello";B.char[] str = {'h', 'e', 'l', 'l', 'o'};C.char str[5] = {"hi"};D.char str[100] = "";
下列初始化字符数组的语句,正确的是()。A.char[] str = {'h', 'e', 'l', 'l', 'o'};B.char[5] str = "hello";C.char[5] str = {"hi"};D.char[100] str = "";