找考题网-背景图
单项选择题

有以下程序
  #include<stdio.h>
  #include<string.h>
  main()
  {char x[]=”STRING”;
  x[0」=0;x[1]=’\0’;x[2」=’0’;
  printf(”%d %d\n”,sizeof(x),strlen(x));
  }
  程序运行后的输出结果是()

A.6 1
B.7 0
C.6 3
D.7 1

热门试题