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

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

What happens when you attempt to compile and run the following code? Choose all that apply.#include #include #include #include #include #include using namespace std;template struct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) {out l(t, t+10); for_each(l.begin(), l.end(), Out (f)); f.cl…

Nội dung câu hỏi

What happens when you attempt to compile and run the following code? Choose all that apply.#include #include #include #include #include #include using namespace std;template struct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) {out l(t, t+10); for_each(l.begin(), l.end(), Out (f)); f.close(); f.open("test.out"); for( ; f.good() ; ) { int i; f>>i; cout<<i<<" ";}f.close();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. file test.out will be opened writing — đáp án hiện tại
  2. B. file test.out will be truncated — đáp án hiện tại
  3. C. file test.out will be opened for reading — đáp án hiện tại
  4. D. no file will be created nor opened
  5. E. program will display sequence 1 2 3 4 5 6 7 8 9 10 — đá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.

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ề