单项选择题

以下程序的输出结果是( )。
#include <stdio.h>
#include <string.h>
main()
char str[12]='s','t','r','i','n','g';
printf("%d\n",strlen(str) );

A.6
B.7
C.11
D.12
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <stdio.h> union pw int i; char ch[2]; a; main() a.ch[0]=13; a.ch[1]=0; printf( %d n ,a.i); 程序的输出结果是(注意:ch[0]在低字节,ch[1]在高字节)( )。
A.13
B.14
C.208
D.209
单项选择题
串的长度是( )。
A.串中不同字符的个数
B.串中不同字母的个数
C.串中所含字符的个数且字符个数大于0
D.串中所含字符的个数
相关试题
  • 以下函数inverse的功能是使一个字符串按逆...
  • 在对文件进行操作的过程中,若要求文件的位...
  • 下列程序的字符串中各单词之间有一个空格,...
  • 执行以下程序段后,s的值为 【15】 。...
  • 以下程序的输出结果是 【14】 。 #in...