下面程序的运行结果是( )。#include<iostream.h>class Sampleint 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
有如下程序:#include <iostream>using namespace std;class Base public: Base()cout<<"BB"; f(); Void f()cout<<"Bf"; ;class Derived: public Base public: Derived() cout<<"DD"; void f() cout<<"Df"; ;int main() Derived d; return 0; 执行上面的程序将输出( )。
A. BBBfDD
BBDfDDDf
C. DD
DDBBBf