Question: Here is hw 8 . c #include #include int g 0 ; / * global variable, uninitialized * / int g 1 = 1 4
Here is hwc
#include
#include
int g; global variable, uninitialized
int g; global variable, initialized
int g; global variable, uninitialized
int g; global variable, initialized
int g; global variable, uninitialized
void proc;
void proc;
int main
extern int etext edata end;
int lc; local variable, stored on stack
int lc; local variable, stored on stack; mix init and uninit
int lc; local variable, stored on stack
static int ls; local static variable, uninitialized data
static int ls; local static variable, initialized data
int pheap;
int pheap;
pheapint malloc sizeofint;
pheapint malloc sizeofint;
printf
main
;
printfp lu: Last address
xffffffffffff;
printfp lu: Address etext
etext, etext;
printfp lu: Address edata
edata, edata;
printfp lu: Address end
end, end;
printfp lu: Address of code for proc
&proc &proc;
printfp lu: Address of code for proc
&proc &proc;
printfp lu: Address of uninitialized global variable g
&g &g;
printfp lu: Address of initialized global variable g
&g &g;
printfp lu: Address of uninitialized global array g
&g &g;
printfp lu: Address of initialized global variable g
&g &g;
printfp lu: Address of uninitialized global variable g
&g &g;
printfp lu: Address heap in heap space
pheapunsigned long pheap;
printfp lu: Address heap in heap space
pheapunsigned long pheap;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local uninitialized static var ls
&ls &ls;
printfp lu: Address of local initialized static var ls
&ls &ls;
proc;
proc;
return ;
void proc
int lc;
int lc;
printf
proc
;
printfp lu: Address of code for proc
&proc &proc;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local variable lc
&lc &lc;
void proc
int lc;
int lc;
static int ls;
static int ls;
printf
proc
;
printfp lu: Address of code for proc
&proc &proc;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of global variable g
&g &g;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local variable lc
&lc &lc;
printfp lu: Address of local uninitialized static var ls
&ls &ls;
printfp lu: Address of local initialized static var ls
&ls &ls;
Part :
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
