题目内容

(1)写出程序的运行结果。#includeusing namespace std;class Stock{public:void print(){cout<<"Stock class.\n";}};class Der1_Stock:public Stock{public:void print(){cout<<"Der1_Stock class.\n";}};class Der2_Stock:public Stock{public:void print(){cout<<"Der2_Stock class.\n";}};int main(){Stock *ptr,s1;Der1_Stock d1;Der2_Stock d2;ptr=&s1;ptr->print();ptr=&d1;ptr->print();ptr=&d2;ptr->print();return 0;}(2)修改上一题的程序,使运行结果为:Stock class.Der1_Stock class.Der2_Stock class.

查看答案
更多问题

1. The auther went quickly into the shop to ___________ .

A. buy a pair of shoes
B. meet one of his old friends
C. have his shoes repaired
D. learn to build a tradition

The author became a little impatient for ________________ .

A. he couldn't stand up with the shoe repairer's modest attitude
B. he was in a hurry to meet a friend
C. the shoe repairer was sad and did nothing about his torn shoes
D. it took the shoe repairer a long time to have his shoes repaired

He felt ____________ when the shoe repairer first mentioned that he had a tradition to live up to .

A. upset
B. thrilled
C. confused
D. doubtful

What was the tradition the shoe repairer's father passed on to him?

A. Being dedicated to work and feeling proud.
B. treating all the clints with hospitality.
C. Running the shoe-repair shop successfully.
D. Finding pleasure in what a person does.

答案查题题库