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

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

What happens when you attempt to compile and run the following code?#include #include #include #include using namespace std;template struct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) { out v1(t, t+10);vector v2(10);transform(v1.begin(), v1.end(), v2.begin(), bind2nd(ptr_fun (Add),1))…

Nội dung câu hỏi

What happens when you attempt to compile and run the following code?#include #include #include #include using namespace std;template struct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) { out v1(t, t+10);vector v2(10);transform(v1.begin(), v1.end(), v2.begin(), bind2nd(ptr_fun (Add),1)); vector ::iterator it = find_if(v2.begin(), v2.end(),bind2nd(equal_to (),10)); cout<<*it<<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.

  1. A. false
  2. B. true
  3. C. 10 — đáp án hiện tại
  4. D. 0
  5. E. compilation error

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ề