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

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

下面程序的输出结果是( )。#include<iostream.h>

#include<string.h>

voidmain()

{

charp1[10],p2[10];

strcpy(p1,"abc");

strcpy(p2,"ABC");

charstr[50]="xyz":

strcpy(str+2,strcat(p1,p2));

cout<<str;

}

A.xyzabcABC

B.zabcABC

C.xyabcABC

D.yzabcABC


参考答案

更多 “ 下面程序的输出结果是( )。#includeiostream.h#includestring.hvoidmain(){charp1[10],p2[10];strcpy(p1,abc);strcpy(p2,ABC);charstr[50]=xyz:strcpy(str+2,strcat(p1,p2));coutstr;}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC ” 相关考题
考题 下面程序的输出结果是【】。define MIN(a,b) (((a)void main(){int 下面程序的输出结果是【 】。define MIN(a,b) (((a)<(b))?a:b)include <iostream.h>void main(){int x= 3, y=5;cout<< MIN(x,y)<<end1;}

考题 以下程序的输出结果是【】。 includevoid main(){ char cha[3][5]={"AAAA","BBBB","CC 以下程序的输出结果是【 】。include<iostream. h>void main(){char cha[3][5]={"AAAA","BBBB","CC"];cout<<cha[1]<<end1;}

考题 下面程序的输出结果是()。includeinclude"string.h"void main(){char a[]="Hello T 下面程序的输出结果是( )。 #include<iostream.h> #include"string.h" void main() {char a[]="Hello Test",b[]="Test"; strcpy(a,b); cout<<a<<end1; } A) B)C) D)A.HelloB.TestC.Hello TestD.Hello Test HelloTest

考题 下面程序的输出结果是( )。include using namespace std;void main(){int s;for(int k 下面程序的输出结果是( )。#include <iostream>using namespace std;void main(){int s;for(int k=2;k<6;k+=2)s=1;for(int j=k; j<6;j++) s+=j;cout<<s<<end1;A.9B.1C.11D.10

考题 下面程序输出的结果是()。includeusing namespace std;void main(){ char ch[][8]={"g 下面程序输出的结果是( )。 #include<iostream> using namespace std; void main() { char ch[][8]={"good","better","best"}; for(int i=1;i<3;++i) { cout<<ch[i]<<endl; } }A.good betterB.better bestC.good bestD.good

考题 下面程序的输出结果是()。includeinclude"stdng.h"void main(){ char a[]="welcome 下面程序的输出结果是( )。 #include<iostream.h> #include"stdng.h" void main() { char a[]="welcome",b[]="well"; strcpy(a,b); cout<<a<<endl; }A.wellomeB.wellcomC.wellD.wellwe

考题 下面程序的输出结果是【】。includeint add(int a, int b);void main(){extern int x, 下面程序的输出结果是【 】。include<iostream.h>int add(int a, int b);void main(){extern int x, y;cout<<add(x, y)<<end1;}int x(20),y(5);int add(int a, int b){int s=a+ b;return s;}

考题 下面程序的输出结果是()。includeusing namespace std;void main(){char cl='a',c2='c 下面程序的输出结果是( )。 #include<iostream> using namespace std; void main() { char cl='a',c2='c'; cout.put('a').put('c').put('\n'); cout.put(c1).put(c2); }A.ac a cB.ac acC.a c ac cD.a c

考题 下面的程序输出的结果是( )。 include using namespace std; void main(){ 下面的程序输出的结果是( )。 #include <iostream> using namespace std; void main(){ int a=2; int c=a; a++; cout<<c; }A.2B.3C.4D.*a

考题 下面程序的输出结果是()。includeusing namespace std;void main(){ int a,b; for(a=1 下面程序的输出结果是( )。 #include<iostream> using namespace std; void main() { int a,b; for(a=1,b=l;a<=100;a++) { if(b>=10) break; if(b%3= =1) { b+=3;continue; } } cout<<a; }A.101B.6C.5D.4