[单选题]

下面程序的输出结果是()。includeincludeusing namespace std;void main(){c

下面程序的输出结果是( )。 #include<iostream> #include<string> using namespace std; void main(){ charp1[10],p2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); charstr[50]="xyz"; strcpy(str+2,strcat(p1,p2)); cout<<str; }

A.xyabcABC

B.yzabcABC

C.xyzabcABC

D.zabcABC

参考答案与解析:

相关试题

下面程序的输出结果是()。#include#includeusing names

[单选题]下面程序的输出结果是()。includeincludeusing namespace std;class point{p下面程序的输出结果是( )。 #include<iostream> #include<math.h> using namespace std; class point { private: double x; double y; public: point(double a,double b) { x=a; y=b; } friend double distances(poin

  • 查看答案
  • 以下程序的输出结果是()。#include#includeusing names

    [单选题]以下程序的输出结果是()。includeincludeusing namespace std;void func(cha以下程序的输出结果是( )。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char *

  • 查看答案
  • 如下程序的输出结果是#include#includeusing namespac

    [单选题]如下程序的输出结果是includeincludeusing namespace std;class XCD{char*如下程序的输出结果是 #include<lostream> #include<cstring> using namespace std; class XCD{ char*a; int b; public: XCD(char*aa,int bB) { a=new char[strlen(aA) +1]; strcpy(a,aA) ; b=bb; } char*Geta( ){ret

  • 查看答案
  • 如下程序的输出结果是#include#includeusing namespac

    [单选题]如下程序的输出结果是includeincludeusing namespace std;class CSum{int如下程序的输出结果是 #include<iostream> #include<iomanip> using namespace std; class CSum{ int x,y; public: CSum(int x0,int y0):X(x0),y(y0){ } friend ostream& operator<<(ostream& os,const CSum&a

  • 查看答案
  • 下面程序的输出结果是 #include #include voidmain()

    [单选题]下面程序的输出结果是#include#includevoid main(){char p1[10],p2[10];strepy(p1,”abc”):strcpy(p2,”ABC”);char str[50]=”xyz”;strcpy(str+2,strcat(p1,p2));cout <}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

  • 查看答案
  • 下面程序的输出结果是 ( ) # include # include { cha

    [单选题]下面程序的输出结果是 ( ) include include { char * p1="abc" , *下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s/n",str);}A.xyzabcABB.zabcABCC.yzabcABCD.xyc

  • 查看答案
  • 下面程序的输出结果是()。#includeusing namespace std

    [单选题]下面程序的输出结果是()。includeusing namespace std;int main(){int n=10;while(n>7下面程序的输出结果是( )。 #include<iostream> using namespace std; int main() { int n=10; while(n>7){ n--; cout<<11<<','; } cout<<endl; }A.10,9,8,B.9,8,7,C.10,9,8,7,D.9,8,7,6,

  • 查看答案
  • 下面程序的输出结果是()。#includeusing namespace std

    [单选题]下面程序的输出结果是()。includeusing namespace std;templateT max(T x,T下面程序的输出结果是( )。 #include<iostream> using namespace std; template<class T> T max(T x,T y) { return(x>= y ? x:y);} template<class T> T max(T x,T y,T z) { T t; t=(x>=y ? x:y); return(t>=z ? t:z);

  • 查看答案
  • 下面程序输出的结果是()。#includeusing namespace std

    [单选题]下面程序输出的结果是()。includeusing namespace std;int fuc (char *x);int main(){下面程序输出的结果是( )。 #include<iostream> using namespace std; int fuc (char *x); int main(){ cout<<fuc("hello")<<endl; return 0; } int fuc(char *x){ char *y=x; while(*y! ='/0')y++; ret

  • 查看答案
  • 下面程序的输出结果是()#includeusing namespace std;

    [单选题]下面程序的输出结果是()includeusing namespace std;int main(){int s:for(int k=2;k下面程序的输出结果是( ) #include<iostream> using namespace std; int 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

  • 查看答案
  • 下面程序的输出结果是()。#include#includeusing names