网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
strlen(“abc123”)的结果是()。
A.3
B.4
C.5
D.6
参考答案和解析
A
更多 “strlen(“abc123”)的结果是()。A.3B.4C.5D.6” 相关考题
考题
有以下程序#include string.hmain( ){ char p[20]={ 'a', 'b', 'c', 'd'},q[]="abc", r[]="abcde"strcat(p,r); s trcpy(p+strlen(q),q);p rintf("%d\n", strlen (p));}程序运行后的输出结果是A)9B)6C)11D)7
考题
有以下程序#includemain(){char p[20]={‘a’,’b’,’c’,’d’},q[]=”abc”, r[]=”abcde”;strcpy(p+strlen(q),r); strcat(p,q);printf(“%d%d\n”,sizeof(p),strlen(p));}程序运行后的输出结果是( )。A.20 9B.9 9C.20 11D.11 11
考题
有以下程序: #includestdio.h #includestrin9.h main( ) {printf{"%d\n",strlen("%d\n",strlen("ATS\n012\|"));} 程序运行后的输出结果是( )。A.3B.8C.4D.9
考题
若有以下定义和语句: char s [10]="abcd!",*s2="\nl23\\"; Drintf("%d%d\n",strlen(sl),strlen(s2)); 则输出结果是( )。A.5 5B.10 5C.10 7D.5 8
考题
下列程序在32位linux或unix中的结果是什么?func(char *str){printf(" %d",sizeof(str));printf(" %d",strlen(str));}main(){char a[]="123456789";printf(" %d",sizeof(a));printf(" %d",strlen(a));func(a);}
考题
以下程序的输出结果是( )。 char str[15]=”hello!”; printf(“%d\n”,strlen(str)); A.15
以下程序的输出结果是( )。 char str[15]=”hello!”; printf(“%d\n”,strlen(str));A.15B.14C.7D.6
考题
若有以下定义和语句char s1[10]=”aBcd!”,*s2=”\n123\\”printF(“%d%d\n”,strlen(sl),strlen(s2));则输出结果是A.5 5B.10 5C.10 7D.5 8
考题
有以下程序#includemain( ){ char p[20]={'a','b','c','d'},q[ ]="abc",r[ ]="abcde';strcat(p,r) ;strcpy(p+strlen(q),q);printf("%d\n",strlen(p));}程序运行后的输出结果是A.9B.6C.11D.7
考题
以下程序的运行结果是【】。 include include using namespace std; void main()
以下程序的运行结果是【 】。include<iostream>include<string>using namespace std;void main(){chara[10]="China",b[]="Chin",c[]="ese";cout<<strlen(strcat(strcpy(a,b),c))<<endl;}
考题
有以下程序# include string.hmain(){char p[20]={′a′, ′b′, ′c′, ′d′}, q[]="abc", r[]="abcde";strcat(p, r); strcpy(p+strlen(q), q);printf("%d\n",strlen(p));}程序运行后的输出结果是A.9B.6C.11D.7
考题
有以下程序include.main(){char*p="abcde\ofghjik\0";printf("%d\n",strlen(p));} 程
有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是A.12B.15C.6D.5
考题
( 31 )若有以下定义和语句char s1[10]= " abcd! " ,*s2= " \n123\\ ";printf ( " %d %d\n ", strlen ( s1 ) ,strlen ( s2 ) ) ;则输出结果是A ) 5 5B ) 10 5C ) 10 7D ) 5 8
考题
单选题有以下程序#include #include main(){ char p[20]= {'a','b','c','d'}, q[]=abc, r[]=abcde; strcat(p,r); strcpy(p+strlen(q),q); printf(%d,strlen(p));}程序运行后的输出结果是( )。A
6B
9C
11D
7
考题
填空题以下程序段的输出结果是()。 Char s[]I=”/1238/080abc”; printf(”%d/n”,strlen(s));
热门标签
最新试卷
![瑞牛题库 章节练习 历年真题 模拟试卷](http://assets.51tk.com/51_sidebar_right_index.jpg)