Question: #include using namespace std; struct structl { short a: float b; }; struct struct2 { int mn; double no: }; int myfun(float p. short q,

 #include using namespace std; struct structl { short a: float b;}; struct struct2 { int mn; double no: }; int myfun(float p.short q, double r) { ints: struct2 Um: if(q> 10) s=p *

#include using namespace std; struct structl { short a: float b; }; struct struct2 { int mn; double no: }; int myfun(float p. short q, double r) { ints: struct2 Um: if(q> 10) s=p * 20; else s=p/(-1): /MyLine return s: } int main { floati: int j; double k[3]; struct1 Umn; return s: } int main() { float i; intj; double k[3]; struct1 Umn; i= 5; j = 10; myfun(i, Umn.a, k[0]): return 0; } Problem 1. (55 Marks] a) Write down the program : http://mahfuzr.com/main/myprogram.html b) Draw a dynarnic symbol table for the given program (at My-Line). c) Draw the stack contents while execution started from the main function and the execution reached at My-Line. d) Show the corresponding code contents in memory for the main & myfun function. Problem 2. (15 Marks Write down the lines of codes in C++ (and figure) to describe (a) Memory Leaks (b) Dangling Reference #include using namespace std; struct structl { short a: float b; }; struct struct2 { int mn; double no: }; int myfun(float p. short q, double r) { ints: struct2 Um: if(q> 10) s=p * 20; else s=p/(-1): /MyLine return s: } int main { floati: int j; double k[3]; struct1 Umn; return s: } int main() { float i; intj; double k[3]; struct1 Umn; i= 5; j = 10; myfun(i, Umn.a, k[0]): return 0; } Problem 1. (55 Marks] a) Write down the program : http://mahfuzr.com/main/myprogram.html b) Draw a dynarnic symbol table for the given program (at My-Line). c) Draw the stack contents while execution started from the main function and the execution reached at My-Line. d) Show the corresponding code contents in memory for the main & myfun function. Problem 2. (15 Marks Write down the lines of codes in C++ (and figure) to describe (a) Memory Leaks (b) Dangling Reference

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!