What is wrong with this code?
```
if(x = 2)
{
cout<<”The number is 2”;
}
```
A. There should not be { }’s
B. A semicolon is missing in the if statement – if (x = 2 )
C. The if statement should be if ( x == 2 )
D. Nothing
C. The if statement should be if ( x == 2 )
You might also like to view...
To insert a comment into a cell, you click New Comment in the ________
A) Comments group on the REVIEW tab B) Comments group on the INSERT tab C) Documentation group on the REVIEW tab D) Documentation group on the INSERT tab
In the pseudocode of the textbook, what does the following statement indicate?
Declare OutputFile itemsOrdered a. itemsOrdered is a file on disk and the program will write data to it. b. itemsOrdered is the internal name used to work with the contents of a file. c. itemsOrdered is a file on disk and the program will read data from it. d. None of these statements are true.