try this

   int p[100];
   cout<<(&p[1])-(&p[0]);
if it is positive, then the stack is growing upwards or else it is
growing downwards. Not sure, please correct me if i am wrong.


On Wed, Dec 15, 2010 at 12:32 AM, bittu <[email protected]> wrote:
> How would you find out if a machine’s stack grows up or down in
> memory?
> can any one xplain wid program..
>
>
> Regards
> Shashank Mani
> BIT Mesra
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to