[单选题]

下面程序的输出结果是 ( ) 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.xyzabcAB

B.zabcABC

C.yzabcABC

D.xycbcABC

参考答案与解析:

相关试题

以下程序的输出结果是()。#include#include main(){cha

[单选题]以下程序的输出结果是()。includeinclude main(){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

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

    [单选题]以下程序的输出结果是______。 include main() { char*a="abcdefghi";int k fun(a);p以下程序的输出结果是______。 #include <string.h> main() { char*a="abcdefghi";int k fun(a);puts(a); } fun(char*s) { int x,y; char c for(x=0,y=strlen(s)-1;x<y:x++,y--) {c=s[y];s[y]=s[x];s[x]

  • 查看答案
  • 以下程序的输出结果是______。#include#includefun(cha

    [单选题]以下程序的输出结果是______。includeincludefun(char*w,int n){ char t,*s以下程序的输出结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) { t=*s1++; *s1=*s2-; *s2=t; } } main() { char*p; p="1234567"; fun(p,st

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

    [单选题]下列程序的输出结果是()。includeincludemain(){ char a[]="/n123//";print下列程序的输出结果是( )。#include<stdio.h>#include<string.h>main(){ char a[]="/n123//"; printf("%d,%d/n",strlen(A) ,sizeof(A) );}A.5,6B.5,5C.6,6D.6,5

  • 查看答案
  • 下面程序的输出结果是 #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 "string.h"fun(cha

    [单选题]下面程序的输出结果是( )。#include "string.h"fun(char*w,int n){ char t,*s1,*s2;s1=w; s2=w+n-1;while(s1<s2){ t=*s1++;*s1=*s2--;*s2=t;}}main(){ static char p[]="1234567";fun(p,strlen(p));printf("%s",p);}A.7654321 B.1717171 C.7171717 D.1711717

  • 查看答案
  • 下面程序的输出结果是 #include classexample { inta:

    [单选题]下面程序的输出结果是#includeclass example{int a:public:example(intB.{a=n++;}void print(){a=a+1;cout < < a < <” ”;}void print()const{cout<<<;}}void main(){example x t(3);const example y(2);x.print();y.print();}A.2 2B.4 3C.4 2D.3 2

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

    [单选题]下面程序的输出结果是 include includevoid main( ) { char p1[10] ,p2下面程序的输出结果是#include<iostream.h>#include<string.h>void main( ){char p1[10] ,p2[10] ;strcpy(p1,"abc") ;strcpy(p2,"ABC") ;char str[50] ="xyz";strcpy(str+2,strcat(p1,p2) ) ;cout < < str;}A.xyza

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

    [单选题]下面程序输出的结果是( )。 include using namespace std; void swap(int下面程序输出的结果是( )。 #include <iostream> using namespace std; void swap(int &a,int &b){ int temp; temp=a; a=b; b=temp; } void main(){ int x=2; int y=3; swap(x,y); cout<<x<<y; }A.23B.32C.abD.

  • 查看答案
  • 下列程序的输出结果是()。 #include #include main() {

    [单选题]下列程序的输出结果是()。 include include main() {char a[]="/n123//"; p下列程序的输出结果是( )。#include<stdio.h>#include<string.h>main(){ char a[]="/n123//";printf("%d,%d/n",strlen(A) ,sizeof(A) );}A.5,6B.5,5C.6,6D.6,5

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