关于字符串的定义及初始化错误的是 A: char str[6]={'a','h','a','h','a'}; B: char *str={'a','h','a','h','a'}; C: char str[]={“ahaha”}; D: char str[]=“ahaha”;
关于字符串的定义及初始化错误的是 A: char str[6]={'a','h','a','h','a'}; B: char *str={'a','h','a','h','a'}; C: char str[]={“ahaha”}; D: char str[]=“ahaha”;
char str[]=“China”; 等价于 A: char str[5]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’,’0’}; B: char str[6]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’,’0’}; C: char str[5]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’}; D: char str[6]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’};
char str[]=“China”; 等价于 A: char str[5]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’,’0’}; B: char str[6]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’,’0’}; C: char str[5]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’}; D: char str[6]={‘C’, ‘h’, ‘i’, ‘n’, ‘a’};
下列数组不是字符串的是()。 A: char a[]="China"; B: char a[5]={'C','h','i','n','a'}; C: char a[6]={'C','h','i','n','a','\0'}; D: char a[7]={'C','h','i','n','a'};
下列数组不是字符串的是()。 A: char a[]="China"; B: char a[5]={'C','h','i','n','a'}; C: char a[6]={'C','h','i','n','a','\0'}; D: char a[7]={'C','h','i','n','a'};
下列字符数组长度为5的是() A: char a[]={‘h’, ‘a’, ‘b’, ‘c’, ‘d’}; B: char b[]= {‘h’, ‘a’, ‘b’, ‘c’, ‘d’, ‘\0’}; C: char c[10]= {‘h’, ‘a’, ‘b’, ‘c’, ‘d’}; D: char d[6]= {‘h’, ‘a’, ‘b’, ‘c’, ‘\0’ }
下列字符数组长度为5的是() A: char a[]={‘h’, ‘a’, ‘b’, ‘c’, ‘d’}; B: char b[]= {‘h’, ‘a’, ‘b’, ‘c’, ‘d’, ‘\0’}; C: char c[10]= {‘h’, ‘a’, ‘b’, ‘c’, ‘d’}; D: char d[6]= {‘h’, ‘a’, ‘b’, ‘c’, ‘\0’ }
下列字符数组长度为5的是: A: char a[10]={'h','a','b','c','d'}; B: char b[]={'h','a','b','e','d','0'}; C: char c[]={'h','a','b','c','0'}; D: char d[6]={'h','a','b','c','0'};
下列字符数组长度为5的是: A: char a[10]={'h','a','b','c','d'}; B: char b[]={'h','a','b','e','d','0'}; C: char c[]={'h','a','b','c','0'}; D: char d[6]={'h','a','b','c','0'};
无法输出字符串"her"的程序段是( ) A: char a[ ]={'h','e','r','\0'}; puts(a); B: char a[4]={'h','e',0,'r'}; puts(a); C: char a[ ]={'h','e','r',0}; puts(a); D: char a[4]={'h','e','r','0'-48}; puts(a);
无法输出字符串"her"的程序段是( ) A: char a[ ]={'h','e','r','\0'}; puts(a); B: char a[4]={'h','e',0,'r'}; puts(a); C: char a[ ]={'h','e','r',0}; puts(a); D: char a[4]={'h','e','r','0'-48}; puts(a);
06410011:与char str[]={“china”};初始化赋值不等价的是( )。 A: char str[]=“china”; B: char str[6]={‘c’,’h’,’i’,’n’,’a’,’\o’}; C: char str[]={‘c’,’h’,’i’,’n’,’a’,’\o’}; D: char str[]={‘c’,’h’,’i’,’n’,’a’};
06410011:与char str[]={“china”};初始化赋值不等价的是( )。 A: char str[]=“china”; B: char str[6]={‘c’,’h’,’i’,’n’,’a’,’\o’}; C: char str[]={‘c’,’h’,’i’,’n’,’a’,’\o’}; D: char str[]={‘c’,’h’,’i’,’n’,’a’};
下列数组不是字符串的是()。 A: char b[]="hi"; B: char b[5]="a"; C: char b[6]={'C','h','i','n','a','\0'}; D: char b[5]={'C','h','i','n','a'}
下列数组不是字符串的是()。 A: char b[]="hi"; B: char b[5]="a"; C: char b[6]={'C','h','i','n','a','\0'}; D: char b[5]={'C','h','i','n','a'}
与如下代码不等价的语句是________。 char str[ ] = "china"; A: char str[6] = “china”; B: char str[ ] = {'c', 'h', 'i', 'n', 'a'}; C: char str[ ] = {'c', 'h', 'i', 'n', 'a', '\0'}; D: char str[ ] = {"china"};
与如下代码不等价的语句是________。 char str[ ] = "china"; A: char str[6] = “china”; B: char str[ ] = {'c', 'h', 'i', 'n', 'a'}; C: char str[ ] = {'c', 'h', 'i', 'n', 'a', '\0'}; D: char str[ ] = {"china"};
以下对字符数组str初始化不等价的是( )。 A: char str[ ]="hello"; B: char str[ ]={'h','e','l','l','o','\0'}; C: char str[ ]={'h','e','l','l','o',0}; D: char str[ ]={'h','e','l','l','o'};
以下对字符数组str初始化不等价的是( )。 A: char str[ ]="hello"; B: char str[ ]={'h','e','l','l','o','\0'}; C: char str[ ]={'h','e','l','l','o',0}; D: char str[ ]={'h','e','l','l','o'};