What is the output from this code?

```
int x = 0;
if(x == 2 || 1)
{
cout<<”Number is 1 or 2”;
}
else
{
cout << “Number is not 1 or 2”;
}

```

A. Number is not 1 or 2
B. Number is 1 or 2
C. Number is 1 or 2 Number is not 1 or 2
D. Nothing. The statement is written incorrectly.

B. Number is 1 or 2

Computer Science & Information Technology

You might also like to view...

The _______ describes hundreds of jobs, including those in the computer field.

A. Bureau of Labor Statistics B. IT department C. web portal D. cloud

Computer Science & Information Technology

A numeric check determines whether a number is within a specified range.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology