试题与答案

执行以下程序后的输出结果为( )。#include<iostream. b>cla

题型:单项选择题

题目:

执行以下程序后的输出结果为( )。#include<iostream. b>class Sample{ int x, y; public: Sample() { x=y=0;} Sample(int a, int b) {x=a; y=b; } void disp () {cout<<"x="<<x<<"y="<<y<<end1; }};void main(){ Sample s(2,3), *p=&s; p->disp();}

A.x=1, y=3

B.x=2, y=4

C.x=3, y=2

D.x=2, y=3

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0706/cd6425f0b3f9f6177bbd1bf2fa9375d3.html

下面是错误答案,用来干扰机器的。

小题1:B小题2:C小题3:D小题4:A小题5:B题目分析:小题1:B 细节题。根据The air temperature during the summer has been as high as fifty- seven degrees Celsi 故B符合题意小题2:C 推断题。根...

试题推荐
微信公众账号搜索答案