Problems 6-24 (14 points, 1 point each) Presume that storage locations are creat
ID: 3739268 • Letter: P
Question
Problems 6-24 (14 points, 1 point each) Presume that storage locations are created at the addresses shown for the scope of each function. State as much information as much as possible about what value will be stored in each variable. t the contents of any variable(s) cannot be determined, indicate with a ? in the appropriate box #include void clara (int po0, int rr, int .pss, float xx, float pry, float zz) void rose (int pAmy, intpRory, loat who, float river): Scope: mainO void donna (int pDena, float kim, float jJodie) O PB20 6. 7. 8. 9. 10. void main(void) int i,j.k; float a,b,c clara (&i.j.;&k;,a, &b;,c) ose PB30 void clara (int .poo. înt rr, int .pss, f loat xx, float p roflot donna (po0. xxpYY) 12. P0O874 F878 87C 880 884 13. 15. 16. pYY ate rose (int *pAmy, ?nt *pRory, float who, tloat river) Scope: rose0 void 18. pAmy 19. pRory 20. whoAA88 21. river 84 (AASC void donna (int "pDena, Eloat kim, float jodie) Scope: donna0 X 22. pDena 4CC 23. kim74DOExplanation / Answer
Values stored in the given boxes are as follows:-
i = 4
j=5
k=6
a=3.3
b=2.2
c=1.1
pQQ=2B20
rr=5
pSS=2B28
xx=3.3
pYY=2B30
zz=1.1
pAmy=2B20
pRory=2B24
who=3.3
river=2.2
pDena=4
kim=3.3
jodie=2.2
Explanation:-
&i , &k, &b means address of variable i, k, b respectively
int *pQQ will hold the address of variable i because clara function has sent the address of variable i. Similar is the case with int *pSS, int *pYY.
Now Donna(pQQ, xx,*pYY)= Donna(2B20,3.3,2.2)
So when the control reaches the scope of Donna()
int *pDena will hold the value at address 2B20 which is 4.
Similarly rose function arguments will hold the values.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.