以下能正确进行字符串赋值、赋初值的语句是______。
A.char s[5]:{'a','e','i','o','u'};
B.char *s; s="good";
C.char s[5]="good";
D.char s[5]; s="good";
以下能正确进行字符串赋值、赋初值的语句是______。
A.char s[5]:{'a','e','i','o','u'};
B.char *s; s="good";
C.char s[5]="good";
D.char s[5]; s="good";
以下不能正确进行字符串赋初值的语句是
A.char str[5]="good!";
B.char str[]="good!";
C.char*srt="good!";
D.char str[5]={ 'g', 'o', 'o', 'd'};
A.charstr[5]="good!";
B.charstr[]="good!";
C.char*str="good!";
D.charstr[5]={’g’,’o’,’o’,’d’};
A.char str[5]="good!";
B.char str[]="good!";
C.char*str="good!";
D.char str[5]={'g','o','o','d'};
定义一个名为“s”的字符型数组,并且赋初值为字符串“123”的错误语句是()。
A.char s[]={‘1’,‘2’,‘3’,‘\0’);
B.char s[]={“1 23”);
C.char s[]={“123\n”);
D.char s[4]={‘1’,‘2’,‘3’};
以下能正确定义赋初值的语句是()。
A.int nl=n2=10:
B.Char e=32;
C.float f=f+1.1;
D.double x=12.3E2.5;
下面各语句中,能正确进行赋字符串操作的语句是
A.char s[5]= { "ABCDE" };
B.char s[5]= { 'A' ,' B' ,' C' ,' D' ,' E' };
C.char *s; s = "ABCBE";
D.char *s; scanf("%s", s);
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!