Câu 6: CPP: C++ Certified Professional Programmer
What will happen when you attempt to compile and run the following code?#include #include #include #include #include using namespace std;int main() {int t[] = { 3, 4, 2, 1, 0, 3, 4, 1, 2, 0 };vector v(t, t + 10);multimap m;for (vector ::iterator i = v.begin(); i != v.end(); i++) { stringstream s;s (*i, s.str()));}pair…
Nội dung câu hỏi
What will happen when you attempt to compile and run the following code?#include #include #include #include #include using namespace std;int main() {int t[] = { 3, 4, 2, 1, 0, 3, 4, 1, 2, 0 };vector v(t, t + 10);multimap m;for (vector ::iterator i = v.begin(); i != v.end(); i++) { stringstream s;s (*i, s.str()));}pair ::iterator, multimap ::iterator> range; range = m.equal_range(2); for (multimap ::iterator i = range.first; i != range.second; i++) { cout first << " ";}return 0;}The output will be:
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. 2 2 — đáp án hiện tại
- B. 1 2
- C. 1 3
- D. 2
- E. 0 2
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.