以下对二维数组a进行正确初始化的是().
A: static char word[]='Turbo\0';
B: static char word[]={'T','u','r','b','o','\0'};
C: static char word[]={"Turbo\0"};
D: static char word[]="Turbo\0";
A: static char word[]='Turbo\0';
B: static char word[]={'T','u','r','b','o','\0'};
C: static char word[]={"Turbo\0"};
D: static char word[]="Turbo\0";
举一反三
- 下列错误的说明语句是( )。 A: char word[]={‘T’,‘u’,‘r’,‘b’,‘o’,‘\0’}; B: char word[]={"Turbo\0"}; C: char word[]="Turbo\0"; D: char word[]=‘Turbo\0’;
- 下列关于带初始赋值的字符数组说明中,错误的是_____。 A: char str[]={'T','u','r','b','o',' ','C','\0'}; B: char str[7]="Turbo C"; C: char str[]="Turbo C"; D: char *str="Turbo C";
- 下列错误的说明语句是( )。 A: char word[]={‘T’,‘u’,‘r’,‘b’,‘o’,‘0’}; B: char word[]={"Turbo0"}; C: char word[]="Turbo0"; D: char word[]=‘Turbo0’;
- 错误的说明语句是()。 A: staticcharword[]={'T','u','r','b','o','\0'}; B: staticcharword[]={"Turbo\0"}; C: staticcharword[]="Turbo\0"; D: staticcharword[]='Turbo\0';
- 以下对字符数组a进行不正确初始化的是( ) A: char a[]=’cool\0’; B: char a[]={‘c’,’o’,’o’,’l’}; C: char a[]={“cool\0”}; D: char a[]=”cool\0”;