• 2022-06-27
    下列定义不正确的是( )。
    A: char a[10]= "hello";
    B: char a[10]*p=a;P="hello";
    C: char *a;a="hello";
    D: char a[10],*p;p=a="hello";
  • D

    内容

    • 0

      以下语句不正确的是( )。? char *a;a="test";|char a[6],*p=a;p="test"| char a[6]="test";|char a[6],*p;p=a="test";

    • 1

      在使用MapReduce程序WordCount进行词频统计时,对于文本行“hello hadoop hello world”,经过WordCount程序的Map函数处理后直接输出的中间结果,应该是下面哪种形式: A: <"hello",1,1>、<"hadoop",1>和<"world",1> B: <"hello",2>、<"hadoop",1>和<"world",1> C: <"hello",<1,1>>、<"hadoop",1>和<"world",1> D: <"hello",1>、<"hello",1>、<"hadoop",1>和<"world",1>

    • 2

      以下不能正确读入字符串的程序段是( ) A: char *p;scanf("%s", p); B: char str[10], *p=str;scanf("%s", p[1]); C: char str[10], *p;p=str; scanf("%s", p); D: char str[10];scanf("%s", &str)

    • 3

      下面各语句行中,能正确进行字符串赋值操作的语句是: A: char *s;scanf("%s",s); B: char st[4][5]={"HELLO"}; C: char s[5]={'H', 'E', 'L', 'L', 'O'}; D: char * s;s="HELLO";

    • 4

      使用( )命令可以将文本内容快速追加到文档中 A: echo "hello" >>index.html B: echo "hello" >index.html C: echo "hello" <<index.html D: echo "hello" <index.html