Final answer:
To declare two variables i and j of type int, assign i the value 2 and j the value 3. Calculate (i + j) and (i = 3). (i + j) is 5 and i = 3 assigns the value 3 to the variable i. Hence the correct answer is option B
Step-by-step explanation:
To declare two variables i and j of type int, you can use the following code:
int i = 2;
int j = 3;
To calculate the sum of i and j, you can use the expression (i + j). In this case, the result will be 5.
The expression (i = 3) is an assignment statement which assigns the value 3 to the variable i. After this statement, the value of i will be 3.
Therefore, the correct statements are:
- (i + j) is 5.
- i = 3 assigns the value 3 to the variable i.
Hence the correct answer is option B