( )。下列程序段的输出结果是()。main( ){ char b[ ]="Hello,you"; b[5]='\0'; printf("%s\n",b);}
A: Hello
B: Hello,you
C: Hello0you
D: Hello,
A: Hello
B: Hello,you
C: Hello0you
D: Hello,
举一反三
- 下列程序段的输出结果是____。main(){ char b[]="Hello,you";b[5]=0;printf("%s\n",b);}
- 以下程序段的输出结果是 。Char s[ ]=”Hello World!”;Strlwr(s);Printf(“%s”,s); A: hello world! B: HELLO world! C: hello WORLD! D: HELLO WORLD!
- char s1[ ] = "hello ";char s2[ ] = "tangx ";strcpy(s1, s2);printf("%s\n", s1);以上代码段执行结果为哪个选项? A: hello tangx B: tangx hello C: hello D: tangx
- 下列不能输出字符串"Hello"的程序段是______。 A: char *t; t="Hello";printf("%s\n",t); B: char *t, s[]="Hello"; t=s;printf("%s\n",t); C: char s[20],*t=s; t="Hello";printf("%s\n",s); D: char *t, s[]="Hello"; t=s;printf("%s\n",s);
- 下列程序段的输出结果是( )。[br][/br]main()[br][/br]{ char s[]="Helloworld";[br][/br] s[5]=0;[br][/br] printf("%s\n",s); } A: Hello0world B: Helloworld C: Hello D: Hello0