Link to home
Start Free TrialLog in
Avatar of karthikeya
karthikeya

asked on

memory storage

Pls give me a soln for the following problem

 i hope there are 3 types to derive an object
 1- stack area
 2- heap are
 3- data area

 for ex:

 // object derivation in data area
 class  mydataobject
 {
 } data1,data2;

 // object derivation in heap area
 class  myheapobject
 {
 };
 void main()
{
myheapobject heap1= new myheapobject();
}

// object derivation in stack area
 class  mystackobject
 {
 };
 void main()
{
mystackobject stack1;
}
suppose we are having some member variables like  a,b,c

 now for the above derived object like myheapobject,mystackobject,mydataobject
 where does the member variables stored either in stack or in heap

 pls explain me


ASKER CERTIFIED SOLUTION
Avatar of Salte
Salte

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tinchos
tinchos

No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Salte {http:#9336733}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer