Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started