A variable that is declared protected:
A. Is visible only in the subclasses (and not in the class it is declared in)
B. Is visible only in the class it is declared in
C. Is visible to all classes, but modifiable only in the class where it is declared
D. Is visible in the class it is declared in, and all of its sub-classes
Câu hỏi trong đề: 700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án !!
Quảng cáo
Trả lời:
Chọn đáp án D
Hot: 1000+ Đề thi cuối kì 1 file word cấu trúc mới 2025 Toán, Văn, Anh... lớp 1-12 (chỉ từ 60k). Tải ngay
CÂU HỎI HOT CÙNG CHỦ ĐỀ
Câu 1
A. i1=2 i2=2
B. i1=2 i2=3
C. i1=3 i2=2
D. Error
Lời giải
Chọn đáp án B
Câu 2
A. Information hiding
B. Inheritance
C. Redefinition
D. Overloading
Lời giải
Chọn đáp án B
Câu 3
A. 21,21
B. 20,21
C. 21,22
D. compile error
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.
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.
Câu 5
A. 100
B. 101
C. none
D. compile error
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.
Câu 6
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.
Câu 7
A. professor researcher teacher myprofessor
B. researcher professor teacher myprofessor
C. myprofessor teacher researcher professor
D. myprofessor researcher professor teacher
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.