Question: 1 . Draw memory diagrams for point one, two, three, and four. 2 . Add labels to diagram at point two to indicate the size
Draw memory diagrams for point one, two, three, and four.
Add labels to diagram at point two to indicate the size in bytes for each variable, array, and function argument.
#include
void trytochangedouble dest;
void trytocopydouble dest double source;
double addthem double a;
int mainvoid
double sum ;
double x;
double y;
printf sizeofdouble is d bytes.
int sizeofdouble;
printf size of x in main is: d bytes.
int sizeofx;
printf y has d elements and its size is: d bytes.
intsizeofy sizeofdoubleint sizeofy;
Point one
trytocopyx y;
trytochangex;
sum addthem&y;
printf
sum of values in y y and y is: f
sum;
return ;
void trytocopydouble dest double source
dest source;
point two
return;
void trytochangedouble dest
dest ;
point three
printf
sizeofdest in trytochange is d bytes.
intsizeofdest;
return;
double addthem double arg
arg ;
point four
printf
sizeofarg in addthem is d bytes.
int sizeofarg;
printf
Incorrect array size computation: addthem says arg has d
element.
intsizeofarg sizeofdouble;
return arg arg arg;
I have included a pciture of how I did it and im not sure if its right
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
