C#中,新建一字符串变量str,并将字符串"Tom′sLivingRoom"保存到串中,则应该使用下列哪条语句()
A: string str = "Tom\'s Living Room";
B: string str = "Tom's Living Room";
C: string str("Tom's Living Room");
D: string str("Tom"s Living Room");
A: string str = "Tom\'s Living Room";
B: string str = "Tom's Living Room";
C: string str("Tom's Living Room");
D: string str("Tom"s Living Room");
举一反三
- C#中,新建一字符串变量str,并将字符串"Tom’sLivingRoom"保存到串中,则应该使用下列哪条语句?() A: A B: B C: C D: D
- 在C#语言中,表示一个字符串的变量应使用以下哪条语句定义? A: Cstring str; B: string str; C: Dim str as string; D: char str;
- The room is _______. They are brothers. A: Tom and Mike’s B: Tom’s and Mike’s C: Tom’s and Mike D: Tom and Mike
- 下列程序片段中不正确的字符串赋值或初始化方式是( )。 A: char str[10]; str=”string”; B: char *str; str=”string”; C: char str[7]={’s’,’t’,’r’,’i’,’n’,’g’,’0’}; D: char str[ ]=”string”;
- 顺序输出字符串中的字符:for str in 'This is a string'do echo $strdone输出结果:This is a string