84.0k views
1 vote
If x is an int, which of the following statements adds 5 to the current value of x and stores the new value back in x?

1 Answer

1 vote
x is already a defined variable and categorized as x
These simple lines show how adding 5 to current value of x stores the new value back in x
x = x + 5
This is an operation where the initial value of x is added with 5 and the result is then equated or stored to as value of x
User Nnarayann
by
5.3k points