• 2022-06-07
    若有定义: char d[15],*p=d; , 则以下正确的赋值语句是( )。
    A: p="I love China!";
    B: d[0]="I love China!";
    C: d="I love China!";
    D: *p="I love China!";
  • A

    内容

    • 0

      以下给字符数组str定义和赋值正确的是( ) A: char str[10]; str={"china!"}; B: char str[]={"china!"}; C: char str[10]; strcpy(str,"abcdefghijkl"); D: char str[10]={"abcdefghijkl"};

    • 1

      以下正确的字符串是() A: "\" B: 'abc' C: China D: ""

    • 2

      若有语句:int a [N],*p=a,i; ,并且i已正确赋值,下面错误的函数调用语句是( )。 A: scanf("%d",&a[i]) ; B: scanf("%d",a+i) ; C: scanf("%d",p+i) ; D: scanf("%d",*(p+i) );

    • 3

      In the poem of ________, Emily Dickinson compared the boat and the sea to two lovers. She showed us her desire for love and intimacy of beloved. A: "Wild nights-wild nights!" B: "I heard a Fly buzz - when I Died" C: "Because I could not stop for Death" D: "I died for Beauty - but was scarce"

    • 4

      因为字符数组和字符指针变量都能实现字符串的存储和运算,所以可以用如下方式对字符数组赋值: char s[15], *p=s="I love you!"; A: 正确 B: 错误