Help me write a C program to represent a memory layout

Status
Not open for further replies.

rameshbabu

Member level 2
Joined
Aug 1, 2007
Messages
46
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,663
Write a small C programme to represent the memory layout , i.e memory is having different segments like stack, heep, BSS, data , code, unintialized , intialized. The programme must cover variables in all the segments.
 

Re: C Programme

I think you should try doing your own homework and then ask questions if you get stuck
 

Re: C Programme

It's not the question of stucking up. i am asking declare a variable per each segment.

For example

int main()
{

int x; -----------------> Stored in Stack segment
}

we know that this variable will store in stack. Similarly i am asking declare variables that must come under each segment. By that there will be a clarity about memory layout.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…