Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Read the following statements and The new values of a and b are: tick the box

ID: 2290928 • Letter: 1

Question

1. Read the following statements and The new values of a and b are: tick the box next to the correct answer in the next column. Use this column for vour rough notes please l a-10 b10 int a - 10 int b 20 b10 b20 b 30 b20 b10 l a-10 NOTE: There is only one correct answer. l a-10 b 30 2. Read the following statements andThe new values of a and b are: tick the box next to the correct answer in the next column. int a=10 int b 20 b 10 b 10 a = 20 la20 a = 20 a = 30 b=a; b 10 b 0 b20 b 10 NOTE: There is only one correct answer. la10 la-10

Explanation / Answer

// Question 1)

int a = 10; // Assign a = 10

int b = 20; // Assign b = 20

a = b; // Assign value of b to a, so the value of a gets updated to 20; and b still hold the previous value i.e b = 20

// Hence, final option is a = 20 and b = 20

// Question 2)

int a = 10; // Assign a = 10

int b = 20; // Assign b = 20

b = a; // Assign value of a to b, so the value of b gets updated to 10; and a still hold the previous value i.e a = 10

// Hence final option is a = 10 and b = 10