下面程序的运行结果是( )。#include<iostream.h>class Sample{int x, y;public:Sample() { x=y=0; }Sample(int a, int b) { x=a; y=b; }void (lis

admin2009-01-15  55

问题 下面程序的运行结果是(    )。#include<iostream.h>class Sample{int x, y;public:Sample() { x=y=0; }Sample(int a, int b) { x=a; y=b; }void (lisp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s(2,3), *p=&s;p->disp();}  

选项 A、x=1, y=2
B、x=2, y=4
C、x=2, y=3
D、x=4, y=3

答案4

解析
转载请注明原文地址:https://jikaoti.com/ti/Ftd0FFFM
0

最新回复(0)