( )不能对字符串赋初值.A) char str[5]="good!"; B) char str[]="good!";C) char *str="good!"; D) char str[ ]={‘g',‘o',‘o',‘d',‘!',‘0'};
A: char str[5]="good!";
B: char str[]="good!";
C: char *str="good!";
D: char str[ ]={‘g',‘o',‘o',‘d',‘!',‘0'};
A: char str[5]="good!";
B: char str[]="good!";
C: char *str="good!";
D: char str[ ]={‘g',‘o',‘o',‘d',‘!',‘0'};
举一反三
- 以下不能正确进行字符串赋初值的语句是()。? char str[5]="good!";|char *str="good!";|char str[]="good!"; |char str[5]={ 'g','o','o','d'};
- 以下能正确进行字符串初始化的语句是( ) A: char str[] = "good!"; B: char str[8] = "good!"; C: char *str = "good!"; D: char str[5] = {'g', 'o', 'o', 'd', '!'};
- ( )不能对字符串赋初值.A) char str[5]="good!"; B) char str[]="good!";C) char *str="good!"; D) char str[ ]={‘g',‘o',‘o',‘d',‘!',‘\0'}; A: char str[5]="good!"; B: char str[]="good!"; C: char *str="good!"; D: char str[ ]={‘g',‘o',‘o',‘d',‘!',‘\0'};
- 以下不能正确进行字符串赋初值的语句是( )。 A、char str[5]= "good!"; B、char *str="good!"; C、char str[]="good!"; D、char str[5]={'g', 'o','o', 'd'}; A: char *str="good!"; B: char str[5]={'g', 'o','o', 'd'}; C: char str[]="good!"; D: char str[5]= "good!";
- 下面()中,数组str保存的不是字符串。 A: char str[5]={'H','e','l','l','o'}; B: char str[6] = {"China"}; C: char str[6] = "China"; D: char str[ ] = "China";