Thứ năm, 20/02/2025
IMG-LOGO

Câu hỏi:

09/07/2024 107

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

Đáp án chính xác

D. Every instance of the class must consider the value of the static variable before initializing

Trả lời:

verified Giải bởi Vietjack

Chọn C

Câu trả lời này có hữu ích không?

0

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

Câu 1:

Which of the following keywords do you think can be used when declaring static members in a class?
(i) Public
(ii) Private
(iii) Protected

Xem đáp án » 14/10/2022 125

Câu 2:

Lệnh nào sau đây là SAI?

Xem đáp án » 14/10/2022 118

Câu 3:

Lệnh nào sau đây định nghĩa một hằng giá trị?

Xem đáp án » 14/10/2022 114

Câu 4:

In the following program, how many times Base’s constructor will be called?
Media VietJack

Xem đáp án » 14/10/2022 112

Câu 5:

Hàm overloaded là những hàm như thế nào?

Xem đáp án » 14/10/2022 112

Câu 6:

Kết quả đoạn lệnh sau là bao nhiêu? For (int i = 0,n = 5; n != i; i++,n--) cout << i << “,”;
Media VietJack

Xem đáp án » 14/10/2022 110

Câu 7:

Cách khai báo hàm nào sau đây là đúng?

Xem đáp án » 14/10/2022 108

Câu 8:

What is the output of the following code?
Media VietJack

Xem đáp án » 14/10/2022 108

Câu 9:

What makes a class abstract?

Xem đáp án » 14/10/2022 104

Câu 10:

Nguyên lý của cấu trúc while là:

Xem đáp án » 14/10/2022 99

Câu 11:

What is the output of the following code?
Media VietJack

Xem đáp án » 14/10/2022 92

Câu 12:

Đoạn lệnh sau có kết quả bao nhiêu?
Media VietJack

Xem đáp án » 14/10/2022 91

Câu 13:

Kết quả đoạn lệnh sau là bao nhiêu?
Media VietJack

Xem đáp án » 14/10/2022 91

Câu 14:

What is the output of the following code?
Media VietJack

Xem đáp án » 14/10/2022 90

Câu 15:

Chuỗi ký tự (string) là gì?

Xem đáp án » 14/10/2022 89