下列语句中,正确的是( ).
A: char myString[ ]="Hello-World!";
B: char myString="Hello-World!";
C: char myString[11]="Hello-World!";
D: char myString[12]="Hello-World!";
A: char myString[ ]="Hello-World!";
B: char myString="Hello-World!";
C: char myString[11]="Hello-World!";
D: char myString[12]="Hello-World!";
A
举一反三
- 下列语句中,正确的是( )。 A: char*myString="Hello-World!"; B: char myString="Hello-World!"; C: char myString[11]="Hello-World!"; D: char myString[12]="Hello-World!";
- 下列语句中,正确的是()。 A: char*myString=“Hello—World!”; B: charmyString=“Hello—World!”; C: charmyString[11]=“Hello—World!”; D: charmyString[12]=“Hello—World!”;
- 下列语句中,正确的是()。 A: char*myString=“Hello-World!”; B: charmyString=“Hello-World!”; C: charmyString[11]=“Hello-World!”; D: charmyString[12]=“Hello-World!”;
- 如何将字符串“Hello World”写入a.txt文件内?FILE *file; file = fopen("a.txt","w"); A: char str = "Hello World"; fputs(&str,file); B: char str = "Hello World"; fputc(&str,file); C: char str = "Hello World"; fput(&str,file); D: char str = "Hello World"; fputs(str,file);
- 以下程序段的输出结果是 。Char s[ ]=”Hello World!”;Strlwr(s);Printf(“%s”,s); A: hello world! B: HELLO world! C: hello WORLD! D: HELLO WORLD!
内容
- 0
如下代码片段的输出是什么? char str[13] = "hello world!";char *p;p = str;while (*p != ' ') { printf ("%c", *p - 'a' + 'A'); p++;} A: hello world! B: HELLOWORLD C: HELLO world! D: HELLO
- 1
从字符串“hello-world”中获取world,以下哪个方法正确 A: substr("hello-world",6); B: substr("hello-world",6,5); C: substr("hello-world",-5,5); D: substr("hello-world",-5);
- 2
下列变量定义正确的是 ( ) A: char c1='c'; B: char ch1="Hello World"; C: char ch2='ab'; D: char ch3="a";
- 3
执行下列语句后的显示结果是( )world="world"print("hello"+world) A: helloword B: "hello"world C: hello world D: "hello"+world
- 4
以下语句正确描述的是( )。 A: printf("hello ,world!") B: printf('hello ,world!'); C: print("hello ,world!"). D: printf("hello ,world!");