设已定义:char st[]="how are you"; 下列程序段中正确的是
A. char a[11]; st=a;
B. char a[12]; strcpy(a,st[10]);
C. char a[12]; strcpy(a,st)
D. char a[]; strcpy(a,st);
查看答案
以下程序的输出结果是________。main(){ char a[10]={'1','2','3','\0','5','6','7','8','9',0};printf("%s\n",a);}
A. 123
B. 1230
C. 123456789
D. 1230567890
以下不能正确进行字符串赋初值的语句是
A. char str[5]="good!";
B. char str[]="good!";
C. char str[5]={''g'',''o'',''o'',''d''};
D. char *s="good";