If a class declares a variable static, this means:
A. Each instance of a class will have its own copy of the variable
B. Changing the variable in one instance will have no effect on other instances of the class
C. Changing the variable in one instance will have no effect on other instances of the class
D. Every instance of the class must consider the value of the static variable before initializing
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 C
Hot: 1000+ Đề thi cuối kì 2 file word cấu trúc mới 2026 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
Lời giải
Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.
Câu 4
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ừ 250K ) để 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. Have wine and cheese with that other friend
B. Allow that class to declare an instance of it in its list of private variables
C. Allow the other class (the one declared as friend) to access to the declaring class’s private variables
D. Allow the class declaring the other as a friend to access the declared class’s private variables
Lời giải
Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để 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. all of above
B. (i)
C. (i), (iii)
Lời giải
Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để 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. 100
B. 101
C. none
D. compile error
Lời giải
Bạn cần đăng ký gói VIP ( giá chỉ từ 250K ) để làm bài, xem đáp án và lời giải chi tiết không giới hạn.