下面的程序段定義了三個類A、B、C和一個全局函數(shù)func() 下列四個選項中,哪個說法是正確的()
A.B::funcB()能夠訪問A::proVar變量 B.C::funcC()能夠訪問A::proVar變量 C.func()能夠訪問B::pubVar變量 D.func()能夠訪問C::pubVar變量
該程序的輸出是()
A.B::print()called. B.A::print()called. C.A::print()called. B::print()called. D.B::print()called. A::print()called.
已知類A、B、C的繼承層次是: A:privateB C:publicA 已知element是B中的公有成員,那么它在C中是()
A.私有的 B.保護的 C.公有的 D.不可訪問的