有以下程序: #include <iostream> using namespace std; class Base public: Base() virtual void who() cout<<"Base Class"<<end1; ~Base() ; class Derivel : public Base public: void who() cout<<"Derivel Class"<<end1; ; class Derive2 : public Base public: void who () cout<<"Derive2 Class"<<end1; ; int main () Base *p; Derivel obj1; Derive2 obj2; p=&obj1; p=&obj2; p->who ( ); return 0; 执行程序后的输出结果是( )。
A. Base Class
B. Derivel Class
C. Derive2 Class
D. 程序编译时出错
查看答案
[听力原文]M: You still have one hour, so relax.W: Relax! How can I when I’m going to be interviewed! What can we learn from the conversation()
A. The woman has waited for an hour.
B. The woman will be interviewed.
C. The woman has no job.
D. The woman doesn’t like waiting.
A LEASEThis lease is made on November 2nd, 2005 between Mr. Richard Zhang (hereinafter (以下) referred to as the Landlord (租让人) and Mr. James Lee (hereinafter referred to as the Tenant (承租人) Both parties have agreed on the following terms and conditions:1. Premises(楼宇): Landlord has agreed to lease to the Tenant the apartment 2312 at Sunshine Garden, situated in 156 Jiefang Road, Nanjing..2. Duration: The tenancy (租期) shall be one year, from November 2nd, 2005 to November 1st, 2006. Upon expiry of this lease, the Landlord has the right to take back the said apartment and all equipment within.3. Rent: The Tenant shall pay for the said apartment a monthly rent of RMB 2,000 on the first day of every month. Should the rent be unpaid within the specified period, a sum of 0.5% per day will be paid to the Landlord for the delay. Should the rent be unpaid for over 30 days, the lease will be automatically terminated(终止).4. Deposit: Within 10 days upon the very day this agreement is signed, the Tenant shall pay the sum of RMB 2,000 which is the deposit of one month’s rent.5. Rights and responsibilities of the Landlord: The Landlord shall undertake to keep the said apartment in all necessary repairs and shall not take it back prior to the expiry date of the lease.6. Rights and responsibilities of the Tenant: The Tenant shall pay the rent, deposit and electricity, heating, water, gas, telephone charges. The Tenant shall use the apartment for living purpose only. The Tenant shall not transfer the said apartment partly or wholly to any Third Party. The Tenant shall be held responsible should there be found any damage to the said apartment. The deposit will not be refunded(偿还)should the Tenant terminates the lease before the due date of the lease.7. Others: If any item not stipulated(规定)in this lease, it shall be negotiated between the two parties, and supplement agreement will be signed.Signature: _________ Signature: _________Richard Zhang James LeeThe Landlord The Tenant Who shall be responsible for gas and heating charges ()shall pay those charges.
为了使程序的输出的正确结果为: Now is 2004.7.10 10:10:10. 那么应在下列程序划线处填入的正确语句是( )。 那么应在下列程序划线处填入的正确语句是( )。 #include <iostream> using namespace std; class TIME; class DATE public: DATE(int y=2004,int m=1,int d=1) year=y; month=m; day=d; friend void DateTime(DATE &d, TIME &t); private: int year, month, day; ; class TIME public: TIME(iht h=0, int m=0,int s=0) hour=h; minute=m; second=s; friend void DateTime(DATE &d,TIME &t); private: int hour,minute, second; ; ______________________ //函数 DateTime 的首部 cout<<"Now is"<<d.year<<’.’<<d.month<<’.’<<d.day<< ’ ’<<t.hour<<":"<<t.minute<<’:’<<t.second<<’.’<<end1; int main ( ) DATE d(2004,7,10); TIME t(10, 10, 10); DateTime(d,t); return 0;
A. void DateTime(DATE &d,TIME &t)
B. void TIME::DateTime(DATE &d,TIME &t) const
C. friend void DateTime(DATE &d,TIME &t)
D. void DATE::DateTime(DATE &d,TIME &t)