更多“已知“chars[10]="hello";”,则s[4]的值为'l'。() ”相关问题
  • 第1题:

    以下选项中正确的语句组是( )。

    A.char s[]; s="HELLO!";

    B.char *s; s={"HELLO!"};

    C.char s[10]; s="HELLO!";

    D.char *s; s="HELLO!";


    正确答案:D

  • 第2题:

    【单选题】下列是为字符数组赋字符串的语句组,其中错误的是 。

    A.char s[l0]; s="program";

    B.char s[]=" program";

    C.char s[l0]="Hello!";

    D.char s[l0];strcpy(s,"hello !");


    char s[10]; s= ” program ” ;

  • 第3题:

    5、下列是为字符数组赋字符串的语句组,其中错误是:

    A.char s[10]; s=”program”;

    B.char s[]=”program”;

    C.char s[10]=”Hello!”;

    D.char s[10];strcpy(s,”hello!”);


    char s[10]; s= ” program ” ;

  • 第4题:

    下列是为字符数组赋字符串的语句组,其中错误是:

    A.char s[10]; s=”program”;

    B.char s[]=”program”;

    C.char s[10]=”Hello!”;

    D.char s[10];strcpy(s,”hello!”);


    char s[10]; s= ” program ” ;

  • 第5题:

    C语言的以下程序段中,不能正确赋字符串(编译时系统会提示错误)的是()

    A.char s[10]= "hello ";

    B.char s[10]; s= "hello";

    C.char t[]="hello",*s=t;

    D.char s[10]; strcpy(s, "hello");


    char s[10];s="abcdefg";