Câu 64: CPP: C++ Certified Professional Programmer
What happens when you attempt to compile and run the following code?#include #include #include using namespace std;class A {int a;public:A(int a) : a(a) {}int getA() const { return a; } void setA(int a) { this?>a = a; } bool operator d (t,t+15);int number = count_if(d.begin(), d.end(), Compare());cout<< number<<endl;r…
Nội dung câu hỏi
What happens when you attempt to compile and run the following code?#include #include #include using namespace std;class A {int a;public:A(int a) : a(a) {}int getA() const { return a; } void setA(int a) { this?>a = a; } bool operator d (t,t+15);int number = count_if(d.begin(), d.end(), Compare());cout<< number<<endl;return 0;}Program outputs:
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. 12
- B. 4
- C. 2
- D. 0
- E. compilation error — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.