有以下程序 #include<string.h> #include<iostream.h> void main( ) { char*p="abcde/0fghjik/0"; cout<<strlen(p);} 程序运行后的输出结果是
A.12
B.15
C.6
D.5
[单选题]有以下程序:includeincludevoid main( ){char * p="abcde/0fghjik/0";c有以下程序: #include<string.h> #include<iostream.h> void main( ) { char * p="abcde/0fghjik/0"; cout < < strlen(p) ;} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]有以下程序:includeincludevoid fun(char s[][10],int n){char t;int i,j;有以下程序: #include<stdio.h> #include<string.h> void fun(char s[][10],int n) { char t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0]>s[j][0]){t=s[i][0];
[单选题]有以下程序:includeincludevoid fun(char*s[],int n){char*t;int i,j;for(有以下程序: #include<stdio.h> #include<string.h> void fun(char*s[],int n) { char*t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])){t=s[i];s[i]=s[j];s[j]=t;} } mai
[单选题]有以下程序:includeincludevoid main(){cout.fill('*');cout.width(10有以下程序: #include<iostream.h> #include<iomanip.h> void main() { cout.fill('*'); cout.width(10); cout,<setiosflags(ios::left)<<123.45<<endl; } 程序执行后的输出结果是( )A.****123.45B.**123.45**C.123.45
[单选题]下列程序的输出结果为()。includeincludevoid main(){cout.precision(4下列程序的输出结果为( )。 #include<iostream.h> #include<iomanip.h> void main() { cout.precision(4); cout<<123.127 cout<<" "<<123.46; }A.123.1 123.4B.123.1 123.46C.123.127 123.46D.123.1123.4
[单选题]有以下程序include main(){ char *p,*q;p=(char*)malloc(sizeof(char)*20);q=p;scanf有以下程序 #include <stdlib.h> main() { char *p,*q; p=(char*)malloc(sizeof(char)*20); q=p; scanf("%s %s",p,q); printf("%s %s/n",p,q); } 若从键盘输入:abc def<回车>, 则输出结果是A.def defB.abc
[单选题]有以下程序:include include main(){char *p[10]={"abc","aabdfg","dcdbe"有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d/n",strlen(p[4])); } 执行后的输出结果是( )。A.2B.3C.4D.5
[单选题]下面程序的输出结果是()。includeincludevoid main(){char p1[10],p2[10下面程序的输出结果是( )。 #include<iostream.h> #include<string.h> void main() { char p1[10],p2[10]; strcpy(p1,”abc”); strcpy(p2,”ABC”); charsty[50]=“xyz”; strcpy(str+2,strcat(p1,p2)); cout<<str; }A.xyzabcA
[单选题]有以下程序: include main( ) { char *p ,* q; p=(char * )malloc(sizeof(char有以下程序: #include<stdlib.h> main( ) { char *p ,* q; p=(char * )malloc(sizeof(char) * 20);q=p; scanf("%s%s",p,q); printf("%s%s/n",p,q); } 若从键盘输入:abc def<回车>,则输出结果是A.def defB.abc def
[单选题]有以下程序:include main( ) char * p[ ] = {"3697" ,"2548" }; int i,j;long num =0有以下程序: #include <stdio.h> main( ) char * p[ ] = {"3697" ,"2548" }; int i,j; long num =0; for(i =0;i<2;i ++ ) { j =0; while(p[i][j]! ='/0') { if((p[i][j]-'0')%2) nu