单项选择题
下面程序的输出结果是
#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) xyzabcABC B) zabcABC C) xyabcABC D) yzabcABC
热门
试题
问答题
以下程序的输出结果是 #include<iostream.h> void reverse(int a[ ] ,int n) int i,t; for(i=0;i<n 2;i++) t=a[i] ;a[i] =a[n-1-i] ;a[n-1-i] =t; void main( ) int b[10] =1,2,3,4,5,6,7,8,9,10;int i,s=0; reverse(b,8) ; for(i=6;i<10;i++) s+=b[i] ; cout < < S; A) 22 B) 10 C) 34 D) 30
单项选择题
以下程序的输出结果是 #include<iostream.h> void main( ) int x=1,y=3; cout < < x++ < < , ; int x=0;x+=y * 2; cout < < x < < , < < y < < , ; cout < < x < < , < < y; A) 1,6,3,1,3 B) 1,6,3,6,3 C) 1,6,3,2,3 D) 1,7,3,2,3