CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 2: CPP: C++ Certified Professional Programmer

What happens when you attempt to compile and run the following code?#include #include #include using namespace std;int main(){int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };vector v(t, t+10);multiset s1(v.begin(),v.end());s1.insert(v.begin(),v.end());pair ::iterator,multiset ::iterator> range; range = s1.equal_range(6); wh…

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;int main(){int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };vector v(t, t+10);multiset s1(v.begin(),v.end());s1.insert(v.begin(),v.end());pair ::iterator,multiset ::iterator> range; range = s1.equal_range(6); while (range.first != range.second) { cout<<*range.first<<" "; range.first++;}return 0;}

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.

  1. A. program outputs: 6 6 — đáp án hiện tại
  2. B. program outputs: 5 7
  3. C. program outputs: 5 5 6 6 7 7
  4. D. program outputs: 5 5 7 7
  5. E. program outputs: 1 1 6 6 5 5

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề