当前位置:毕业生招聘信息网知名企业资料IT/电信Microsoft(微软) → 知名企业资料内容

MSRA笔试题4(A卷)

作者:佚名  来源:不详  发布时间:2004-4-26 22:02:00
#include <stdio.h>class A{public:void FuncA(){printf("FuncA called\n");}virtual void FuncB(){printf("FuncB called\n");}};class B: public A{public:void FuncA(){A::FuncA();printf("FuncAB called\n");}virtual void FuncB(){printf("FuncBB called\n");}};void main(void){B b;A *pa;pa=&b;A *pa2=new A;b.FuncA();b.FuncB();pa->FuncA();pa->FuncB();pa2->FuncA();pa2->FuncB();delete pa2;}What is the output of the above program?
请在邮件中注明:信息来自Byszp.COM