Your friend Jimmy is going to marry Sherry. Write a note of congratulations to him. Marks will be awarded for content, organization, grammar and appropriateness.
若有如下程序: #include<iostream> using namespace std; class TestClass public: void who() cout<<"TestClass"<<endl; ; class TestClass1:public TestClass public: void who()cout<<"TestClass1"<<endl; ; int main() TestClass *p; TcstClass1 obj1; p=&obj1; p->who(); return 0; 则该程序运行后的输出结果是( )。
A. TestClass1
B. TestClass
C. 0
D. 无输出
It is _____ taste whether you like western classic music or chinless folk music.
有如下程序: #include<iostream> using namespace std; class Part public: Part(int x=0):val(x) cout<<val; ~Part()cout<<val; private: int val; ; class Whole public: Whole(int x ,int y, int z=0):p2(x),p1(y),val(z)cout<<val; ~Whole()cout<<val; private: Part p1,p2; int val; ; int main() Whole obj(1,2,3); return 0; 程序的输出结果是( )。
A. 123321
B. 213312
C. 213
D. 123123