当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有以下程序 #include main() {char*p="abcde\0fghjik\0"; printf("%d\n",strlen(p)); }


有以下程序

#include

main()

{ char *p="abcde\0fghjik\0 ";

printf("%d\n ",strlen(p));

}

程序运行后的输出结果是

A.12

B.15

C.6

D.5

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • 有以下程序:includemain(){char ch[3][5]={"AAAA","BBB",

  • 如下程序的输出结果是 #include<stdio.h> main() {char ch[2][5]={"6937","8254"},*p[2];

  • 阅读下列程序,则在执行后,程序的运行结果为 include "stdio.h" include "string.h" main() {ch

  • 阅读下列程序,则在执行后,程序的运行结果为 include "stdio.h" include "string.h" main() {ch

  • 有以下程序: #include<stdio.h> unionpw {inti; charch[2];}a; ?main() ?{a.ch[0" />