I need a memory diagram of this C++ function: ***CODE*** #include using namespace std; int f2(int r, int& s) { r /= 2; s *= 3; int temp = r + s + 20; return temp;} int f1(int& p) { int q = 5; p = 95;...

I need a memory diagram of this C++ function: ***CODE*** #include using namespace std; int f2(int r, int& s) { r /= 2; s *= 3; int temp = r + s + 20; return temp; } int f1(int& p) { int q = 5; p = 95; int temp = f2(p, q); return temp; } struct s1 { string fname; int grade; s1() : fname(""), grade(0) {} }; int main() { int a = 7; int b = f1(a); s1* summa_cum_laude = new s1(); s1* magna_cum_laude = new s1(); summa_cum_laude->fname = "Roxanne"; summa_cum_laude->grade = a; magna_cum_laude->fname = "Rock"; magna_cum_laude->grade = b; cout < (*summa_cum_laude).fname="">< "'s="" grade:="" "="">< (*summa_cum_laude).grade="">< endl;="" cout="">< (*magna_cum_laude).fname="">< "'s="" grade:="" "="">< (*magna_cum_laude).grade="">< endl;="" delete="" summa_cum_laude;="" magna_cum_laude="nullptr;">

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here