In the following, what are the values of the variables after each statement when coding a java program? Int a, b, c, d; d = -8; a =...

      

In the following, what are the values of the variables after each statement when coding a java program?
Int a, b, c, d;
d = -8;
a = 1 * 2 + 3;
b = 1 + 2 * 3;
c = (1 + 2) * 3;
c = a + b;
d = -d;

  

Answers


Davis
The final values of a, b, c, d are 5, 7, 12, 8.
Githiari answered the question on January 26, 2018 at 12:26


Next: Explain the problem with this fragment of code: Int a, b; a = b; b = 1;
Previous: My salary is sh.20,000, and I agree to give you half using the following calculation in java: Int half = 20,000 * (1/2); How much do you...

View More Computer Studies Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions