JavaScript is required

Đầu ra là gì?

A.

1 1

B.

1 0

C.

'x' định danh chưa được khai báo

Trả lời:

Đáp án đúng: C


The code declares a global variable `x` initialized to 1. Inside a block, another variable `x` is declared and initialized to 0. The line `cout << ::x << " " << x << endl;` prints the global `x` (using the scope resolution operator `::`) and the local `x`. Therefore, the output is "1 0".

Câu hỏi liên quan