|1||Compound Assignment Operators Output|
|2||Arrange such that a is 700 and b is 164|
|3||Arithmetic Operators Increment Decrement Compound Assignment Output|
|4||Arithmetic Operators Increment Decrement Compound Assignment Output36|
|5||Arithmetic Operators Incorrect statement|
|6||Arrange the lines of the code|
|8||Creating Variables and Arithmetic Operators|
What will be the output of the following program?
Correct Answer : C
Execution of program starts from
main an integer variable
a is declared and initialized to
5. This new value is reflected when
a is used next time.
a += a -> a = a + a -> a = 5 + 5 = 10
a = 7 + a = 7 + 9 = 16
a *= a ->
a = a * a = 16 * 16 = 256
a -= 3 ->
a = a - 3 = 256 - 3 = 253
The value of
a is printed using the display statement. So output is a = 253.