Câu 56: CPP: C++ Certified Professional Programmer
What will happen when you attempt to compile and run the following code?#include using namespace std;template class A {T_v;public:A(T v);};template A::A(T v):_v(v) {}int main(){A a(2);cout<<1<<endl;return 0;}
Nội dung câu hỏi
What will happen when you attempt to compile and run the following code?#include using namespace std;template class A {T_v;public:A(T v);};template A::A(T v):_v(v) {}int main(){A a(2);cout<<1<<endl;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.
- A. program will display: 1
- B. program will not compile — đáp án hiện tại
- C. program will compile
- D. program will cause runtime exception
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.