4/2018 11 59 PM scure: 0.0 of 1.0 Send Message Question 2.31 Close Window Score:
ID: 3881069 • Letter: 4
Question
4/2018 11 59 PM scure: 0.0 of 1.0 Send Message Question 2.31 Close Window Score: Sormy, you did not answer the question correcty lized to the value 3.1 e expression on the ri atements finish execu you Answerfs): (Your response(s) are shown below.) Suppose k, m, and n are already declared int variables that hold concrete but unknown values Suppose also that they hold the wrong values m should hold k's value, n should hold m's value, and k should hold n's value. White a series of assignment statements that give k, m and n their correct values articular numerical val work int temp: 2 temp=m en after execution bot ble in your code whose be assigned the origin k=temp ; 5 int temp1: 6 templFn n=m; Sm-templ: 9 int temp2: RESUBMIT ANSWER Feedback: temp, and then temp is u k contains m's value aper draw three boxes in the code fragment at m contains k's value n contains n's value application below to stej s and how cemputer memory is allocatedExplanation / Answer
Here we are having 3 variables k,m and n which are already declared and unknown values.
And m shouls hold k value
suppose if we write like m = k; then k value should be placed in m variable. But we lost the value stored in m.
So we take temp variable like temp, this is only for storing value.
int temp = m;
m = k;
k = n; // k should holds n value
n = temp; // n should hold m value; m value stored in temp variable previously.
in this way the values are placed in their variables
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.