题海让大学四年没有难题
白天模式登陆

题目详情

单选题 Given the following program:#include <iostream>using namespace std;class Base {public: void fun ( ) { cout << "Base::fun" << endl; }};class Derived : public Base {public: void fun( ) { __________; cout << "Derived::fun" << endl; }};int main( ) { Derived d; d.fun( ); return 0;}After compiling and executing, it displays:Base::funDerived::funThen, the statement should be filled in underline is ( )

A. Base.fun( )

B. Base::fun( )

C. Base->fun( )

D. fun( )

C++语言程序设计课程封面

学科:C++语言程序设计

时间:2025-06-14 05:35:22

Copyright © 2022 津ICP备2021001502号