Câu hỏi:

28/07/2025 55 Lưu

What do you think is the outcome of calling a redefined non-virtual function using a base-class pointer?

A. The appropriate redefined version of the function will be used

B. The base-class version of the function will always be used

C. The outcome is unpredictable

D. A run-time error will occur

Quảng cáo

Trả lời:

verified Giải bởi Vietjack

Chọn đáp án B

CÂU HỎI HOT CÙNG CHỦ ĐỀ

Lời giải

Chọn đáp án B

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 199K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Câu 5

A. There is nothing wrong

B. One cannot have a ‘Base’ pointer to ‘Derived’ since it is not derived publicly

C. One need a derived class pointer to point to a derived class

D. One required to code a constructor for Derived

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 199K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 199K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP

Câu 7

A. can be used without an instantiation of an object

B. can only access static data

C. Both 1 and 2 are correct

D. Neither 1 nor 2 are correct

Lời giải

Bạn cần đăng ký gói VIP ( giá chỉ từ 199K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.

Nâng cấp VIP