29.5k views
16 votes
Determine the value of a and b at the end of the following code segment:

int a = 5;
int b = 10;
a++;
b*=a;
a = b + b;

The value stored for a is _____ and the value stored for b is _____

Choices

120 and 60
60 and 30
5 and 10
30 and 60

User Mata
by
5.7k points

1 Answer

11 votes

Answer:

30 and 60

Step-by-step explanation:

User Roman Klimenko
by
6.1k points