700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án - Phần 19

What is the output of the following code? #include using namespace std; int main() { int a = 20, b = 100; int &n = a; n = a++; n = &b; cout << a << "," << n << endl; system("pause"); }

1/25

What is the output of the following code? #include using namespace std; int main() { int a = 20, b = 100; int &n = a; n = a++; n = &b; cout << a << "," << n << endl; system("pause"); }

21,21

20,21

21,22

compile error

Giải thích

Chọn đáp án D