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

Consider the program fragment given here and use it to answer the questions belo

ID: 3570106 • Letter: C

Question

Consider the program fragment given here and use it to answer the questions below. (12 Points)Question 1: What is the value of each variable after line of code with the

Question 1 comment has executed?

first: __________ middle: __________ last: __________

Question 2: What is the value of each variable after line of code with the Question 2 comment has executed?

a: __________ b: __________ c: __________

void swap(char first, char & middle, char & last)

{

first = last;

middle = middle + 4;

last = tolower(middle);        

// Answer Question 1

}

int main()

{

char a = 'B';

char b = 'C';

char c = 'F;

swap(a, b, c);

// Answer Question 2

return 0;

}

Explanation / Answer

1) first = 'F'

middle = 'G'

last = 'c'

2)

a = 'B'

b = 'C'

c = 'F'

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote