单项选择题

有以下程序:
#include<iostream>
#include<string>
using namespace std;
int main()

char arr[2][4];
strcpy(arr[0],"you");
strcpy(arr[1],"me");
arr[0][3]=’&’;
cout<<arr[0]<<end1;
return 0;

执行后的输出结果是( )。

A.you&me
B.you
C.me
D.err
<上一题 目录 下一题>
热门 试题

单项选择题
有如下程序: #include <iostream> using namespace std; class point int x, y; public: point( int vx, int vy ) x = vx; y = vy; point ( ) x = 0; y = 0; point operator+( point pl ) point p; int px = x + p1.x; int py = y + p1.y; return point( px, py ); point operator-( point p1 ) point p; int px = x - p1.x; int py = y - p1.y; return point( px, py ); void print() cout<<x<< , <<y<<end1; ; int main () point pl ( 10, 10 ), p2 ( 20, 20 ); p1 = p1 + p2; p1.print (); return 0; 执行后的输出结果是( )。
A.10,10
B.20,20
C.10,20
D.30,30
单项选择题
下列关于单目运算符++、--的叙述中,正确的是( )。
A.它们的运算对象可以是任何变量和常量
B.它们的运算对象可以是char型变量和血型变量,但不能是float型变量
C.它们的运算对象可以是int型变量,但不能是doule型变量和float型变量
D.它们的运算对象可以是char型变量、int型变量和float型变量
相关试题
  • 有以下程序: #include <fstream> #...
  • 下面程序的输出结果是 【13】 。 #in...
  • 若有以下程序: #include <iostream>...
  • 下面程序是一个堆栈的类模板,在横线处填上...
  • 实现编译时的多态性的机制称为 【10】 ...