以下代码的输出是() str3 = 'Hello World!' print(str3.split())
A: ['Hello', 'World!']
B: ['Hello', 'World','!']
C: ['H','e','l','l','o',' ','W','o','r','l','d','!']
D: ['H','e','l','l','o','','W','o','r','l','d','!']
A: ['Hello', 'World!']
B: ['Hello', 'World','!']
C: ['H','e','l','l','o',' ','W','o','r','l','d','!']
D: ['H','e','l','l','o','','W','o','r','l','d','!']
举一反三
- 给出以下定义,则正确的叙述是: char s1[]="hello world!"; char s2[]={'h','e','l','l','o',' ','w','o','r','l','d','!'};
- 以下对字符数组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'};
- 以下正确的初始化语句是: A: char str[]="HELLO"; B: char str[100]= "HELLO"; C: char str[] = {'H', 'E', 'L', 'L', 'O'}; D: char str[] = {'HELLO'}
- 下面错误的初始化语句是_____ A: char str[]="hello"; B: char str[]={'hello'}; C: char str[100]="hello"; D: char str[]={'h','e','l','l','o'};
- 下面代码程序输出的值是多少()?a="Hello world"print(a[-1]) A: H B: d C: o D: l