• 2022-05-30
    下列语句中,正确的是( ).
    A: char myString[ ]="Hello-World!";
    B: char myString="Hello-World!";
    C: char myString[11]="Hello-World!";
    D: char myString[12]="Hello-World!";
  • A

    内容

    • 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!");