4) Determine the output of the following code segment. You mus trace the code to show how you reached the answer. (2 point 4.1 int x 3, y = 2; x=x+y; y=x-y; x=x-y; printf(“X is %dn”, x); printf(“y is %dn”, y);

At start x = 3 and y = 2
After execution of statement x = x + y
Now, x = 3 + 2 = 5
After execution of statement y = x – y
Now, y = 5 (current value of x is 5) – 2 = 3
After execution of statement x = x – y
Now, x = 5 – 3 (current value of y is 3) = 2
Now the program prints the following:
x is 2
y is 3
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"