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

题目详情

单选题 Given the following program:#include <iostream>using namespace std;class Base {private: void fun1( ) const { cout << "fun1"; }protected: void fun2 ( ) const { cout << "fun2"; }public: void fun3 ( ) const { cout << "fun3"; }};class Derived : protected Base {public: void fun4( ) const { cout << "fun4"; }};int main( ) { Derived obj; obj.fun1( ); // (1) obj.fun2( ); // (2) obj.fun3( ); // (3) obj.fun4( ); // (4) return 0;}Which lines followed with comment is not correct

A. (1)(2)(3)(4)

B. (1)(2)(3)

C. (2)(3)(4)

D. (1)(4)

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

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

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

Copyright © 2022 津ICP备2021001502号