Question: Instructions: I need a table showing Label, address, value. Also, the number of total bytes. For example, |Label|Address|Value| | i | 400-403 | 0 |
Instructions: I need a table showing Label, address, value. Also, the number of total bytes. For example,
|Label|Address|Value|
| i | 400-403 | 0 |
Question 1:
Write out the memory map for the following code, providing all values at the end of execution. How many total bytes does this code declare for variables?
#include
main() {
char a,*b,c[3];
int i,*j,k[3];
a=N;
b=&(c[2]);
j=&(k[0]);
for (i=0; i<3; i++) {
*b=a-(char)i;
b--;
*j=i+5; j++;
}
}
==============================================
Question 2:
Write out the memory map for the following code, providing all values at the end of execution. How many total bytes does this code declare for variables? double d[3],*e;
int i,*j;
char a,*b,c[3];
i=3; j=&i; d[0]=4.2;
e=&(d[1]);
*(e-1)=1.5;
e[1]=2.3;
for (i=0; i<5; i++)
c[i%3]=(char)(*j+i);
b=&a;
*b=c[2];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
