网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面程序段的运行结果是()。  char *p=“abcdefgh”;  p+=3;  printf(“%d/n”,strlen(strcpy(p,“ABCD”))); 

  • A、4
  • B、7
  • C、8
  • D、12

参考答案

更多 “ 下面程序段的运行结果是()。  char *p=“abcdefgh”;  p+=3;  printf(“%d/n”,strlen(strcpy(p,“ABCD”))); A、4B、7C、8D、12” 相关考题
考题 有以下程序#include string.hmain( ){ 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

考题 有以下程序#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

考题 有以下程序#includemain(){char p[20]={‘a’,’b’,’c’,’d’},q[]=”abc”, r[]=”abcde”strcat(p,r); Strcpy(p+strlen(q),q);Printf(“%d \n”,sizeof(p));}程序运行后的输出结果是( )。A.9B.6C.11D.7

考题 有以下程序#includemain()void f(char p[][10], int n ) /* 字符串从小到大排序 */{ char t[10]; int i,j;for(i=0;ifor(j=i+1;jif(strcmp(p[i],p[j])0) {strcpy(t,p[i]); strcpy(p[i],p[j]); strcpy(p[i],t); }}main(){char p[5][10]={“abc”,”aabdfg”,”abbd”,”dcdbe”,”cd”};f(p,5);printf(“%d\n”,strlen(p[0]));}程序运行后的输出结果是( )。A.2B.4C.6D.3

考题 有以下程序#include stdio.h#include string.hmain(){ char a[10]="abcd";printf("%d,%d\n",strlen(a),sizeof(a));}程序运行后的输出结果是A)7,4B)4,10C)8,8D)10,10

考题 下面程序段的运行结果是char *p="abcdefgh";p+=3;printf("%d\n",strlen(strcpy(p,"ABCD")));A.8B.12C.4D.7

考题 有以下程序#includemain(){ char *p="abcde\0fghjik\0 ";printf("%d\n ",strlen(p));}程序运行后的输出结果是A.12B.15C.6D.5

考题 有以下程序:includestrintg.hmain{ char p[20]={a,b,c,d),q[]=abc,r[]=strintg.hmain{ 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

考题 有以下程序 include main() { char p[20]={'a','b','c','d'},q[]="abc",r[] 有以下程序 #include<string.h> main() { 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 void f(char p[][10],int n)/*字符串从小到大排序*/ { 有以下程序 #include<string.h> void f(char p[][10],int n)/*字符串从小到大排序*/ { char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() { char p[5][10]={"abc","aabdfg:,"abbd","dcdbe","cd"}; f(p,5); printf("%d\n",strlen(p[0])); } 程序运行后的输出结果是A.2B.4C.6D.3

考题 下面程序段的运行结果是( )。 char a[]="abcdefgh"; char *p=a; p+=3; printf("%d\n",strlen(strcpy(p,"ABCD")));A.8B.12C.4D.7

考题 有以下程序:includevoid f(char p[][10],int n){char t[10];int i,j;for(i=0;i 有以下程序: #include<string.h> void f(char p[][10],int n) {char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() {char p[5][10]={"abc","aabdfg","abbd","dedbe","cd"}; f(p,5); printf("%d\n",strlen(p[0]));} 程序运行后的输出结果是( )。A.2B.4C.6D.3

考题 下面程序段的运行结果是char *p="abcdefgh";p+=3;printf("%d\n",strlen(strcpy(P,"ABCD"))); A.8 B.12 C.4 D.7

考题 有以下程序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

考题 有以下程序: point(char *p){p+=3;} main() {char b[4]={'a','b','c','d',},*p=b; point(p);printf("%c\n",*p); } 程序运行后的输出结果是 ______。A.aB.bC.cD.d

考题 有以下程序: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[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 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

考题 以下程序运行后的输出结果是______。 main() { char a[]="ABCDEFGH",b[]="abCDefGh"; char*p1,*p2;int k; p1=a;p2=b; for(k=0;k<=7;k++) if*(p1+k)==*(p2+k))printf("%c",*(p1+k)); printf("\n"); }A.ABCDEFGB.CDGC.abcdefghD.abCDefGh

考题 以下程序段的输出结果是______。 char *p="abodefgh"; p+=3; printf("%d\n",strlen(strcpy(p,"12345")));A.8B.12C.5D.7

考题 有以下程序: include main( ) { char *p="abcde\0ghjik\0"; printf("%d\n",str 有以下程序: #include<string.h> main( ) { char *p="abcde\0ghjik\0"; printf("%d\n",strlen(p) ); } 程序运行后的输出结果是A.12B.15C.6D.5

考题 有以下程序:includeincludeusxng namespace std;int main(){ char p[] = "a 有以下程序: #include <iostream> #include <string> usxng namespace std; int main() { char p[] = "abcdefgh"; cout<<strlen(strcpy(p,"12345"))<<end1; return 0; } 执行后输出的结果是( )。A.8B.12C.5D.7

考题 下面程序段的运行结果是( )。 char*p="abcdefgh"; p+ =3; printf("%d\n",stfien(strcpy(p,"ABCD")));A.8B.12C.4D.7

考题 单选题有以下程序#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

考题 单选题有以下程序:#include #include char *a=you;char *b=Welcome you to Beijing!;main(){ char *p; p=b; while(*p != *a)p++; p+=strlen(a)+1; printf(%s,p);}程序运行后的输出结果是(  )。A Beijing!B you to Beijing!C Welcome you to Beijing!D to Beijing!

考题 单选题下面程序段的运行结果是()。  char *p=“abcdefgh”;  p+=3;  printf(“%d/n”,strlen(strcpy(p,“ABCD”)));A 4B 7C 8D 12