Computer Science, asked by godofvictory, 11 months ago

if a=10 and b=20, then what will be the value in variable a and b? give reason to support your answers :
a-=b;
a/=b;
a*=b;
a+=b;

Answers

Answered by mariospartan
30

Answer:

  1. (a,b) = -10, 20
  2. (a,b) = 0.5, 20
  3. (a,b) = 200, 20
  4. (a,b) = 30, 20

Explanation:

For the option a:

The option can be expanded into

a-=b = (a = a – b); a = 10; b = 20

Therefore, the real value of a = -10 and b = 20

For the option b:

The option can be expanded into

a/=b = (a = a / b); a = 10; b = 20

Therefore, the real value of a = 0.5 and b = 20

For the option c:

The option can be expanded into

a*=b = (a = a* b); a = 10; b = 20

Therefore, the real value of a = 200 and b = 20

For the option d:

The option can be expanded into

a+=b = (a = a+ b); a = 10; b = 20

Therefore, the real value of a = 30 and b = 20

Answered by pranav20071011
2

Answer:

(a,b) = -10, 20

(a,b) = 0.5, 20

(a,b) = 200, 20

(a,b) = 30, 20

Explanation:

Similar questions