设有定义:"char s[12]={"string"};" 则printf("%d\n",strlen(s));的输出是( )A.6B.7C.11D.12
设有定义:"char s[12]={"string"};" 则printf("%d\n",strlen(s));的输出是( )
A.6
B.7
C.11
D.12
相关考题:
( 12 ) 有以下程序#include stdio.h#include string.hvoid fun ( char *str ){ char temp;int n,i;n=strlen ( str ) ;temp=str[n-1];for ( i=n-1;i0;i-- ) str[i]=str[i-1];str[0]=temp;}main (){ char s[50];scanf ( " %s " ,s ) ; fun ( s ) ; printf ( " %s\n " ,s ) ;}程序运行后输入: abcdef 回车 ,则输出结果是 【 12 】 。
设已执行预编译命令include,以下程序段的输出结果是char s[]="an apple";printf("%d\ 设已执行预编译命令#include<string.h>,以下程序段的输出结果是 char s[]=" an apple" ; printf("%d\n",strlen(s));A.7B.8C.9D.10
若有定义和语句: char*sl="12345",* s2="1234"; printf("%d\n",strlen(stren(sl,s2))); 则输出结果 ( )A.4B.5C.9D.10
若有以下定义和语句: char*s1="12345",*s2="1234"; printf("%d\n",strlen(strcpy(s1,s2)));则输出结果是______。A.4B.5C.9D.10
以下程序的输出结果是()includeincludemain(){char str[12]={'s','t','r', 以下程序的输出结果是( ) #include<stdio.h> #include<string.h> main() {char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }A.6B.7C.11D.12
以下程序的输出结果,是_______。 main() { char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }A.6B.7C.11D.12
以下程序运行后输入:3,abcde回车,则输出结果是【 】include move(char *str, 以下程序运行后输入:3,abcde回车,则输出结果是【 】include <string.h>move(char *str, int n){ char temp; int i;temp=str[n-1];for(i=n-1;i>0;i--) str[i]=str[i-1];str[0]=temp;}main( ){ char s[50]; int n, i, z;scanf("%d,%s",n,s);z=strlen(s);for(i=1; i<=n; i++) move(s, z);printf("%s\n",s);}
有以下程序includemain(){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
有以下程序:includemain(){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
有以下程序inculde stdio.hinculde string.hvoid Fun(char*str){ char temp;int n,I;n=strlen(str);temp=str[n-1];For(i=n-1;i0;i--) str[i]=str[i-1];str[0]=temp;}main(){ char s[50];ScanF(“%s”,s);Fun(s);printF(“%s\n”,s);}程序运行后输入:aBcDeF<回车>,则输出结果是【 】
若有以下定义和语句char s1[10]=”aBcd!”,*s2=”\n123\\”printF(“%d%d\n”,strlen(sl),strlen(s2));则输出结果是A.5 5B.10 5C.10 7D.5 8
若有以下定义语句: char * sl="12345", * s2="1234"; printf("%d"n",strlen(strcpy(s1,s2))); 则输出结果是 ( )A.4B.5C.9D.10
以下程序的输出结果是______。 main() { char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }A.6B.7C.11D.12
设有 static char str[]="Beijing"; 则执行 printf("%d\n",strlen(strcpy(str,"China"))); 后的输出结果为_______。A.5B.7C.12D.14
设有如下程序: #include'string.h" main() { static char s1[20],s2[20]; scanf("%s",s1);scanf("%s",s2); if(strcmp(s1,s2)) printf("@"); else printf("$"); printf("%d\n",strlen(strcat(s1,s2))); } 如果从键盘上输入name1<回车>name2<回车>,则程序运行后的输出结果是( )。A.$9B.@11C.$10D.@10
设已执行预编译命令include,以下程序段的输出结果是()。char s[]="an apple";printf(" 设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));A.7B.8C.9D.10
( 31 )若有以下定义和语句char s1[10]= " abcd! " ,*s2= " \n123\\ ";printf ( " %d %d\n ", strlen ( s1 ) ,strlen ( s2 ) ) ;则输出结果是A ) 5 5B ) 10 5C ) 10 7D ) 5 8
若有定义和语句: char s[10]:s=""abcd"";printf(""%s/n"",s); 则结果是(以下u代表空格)()A、输出abcdB、输出aC、输出abcduuuuuD、编译不通过
单选题若有以下定义和语句:char s1[10]=abcd!, *s2=n123\\;printf(%d%d, strlen(s1), strlen(s2));则输出结果是( )。A55B105C107D58
填空题以下程序段的输出结果是()。 Char s[]I=”/1238/080abc”; printf(”%d/n”,strlen(s));