Q28 How to check that the stack grows up or down?

To check stack grows up or down take two local variable and check their address.

If (address of variable 1 < address of variable 2)

{

            Stack is growing upwards;

}

else

{

            Stack is growing downwards;

}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.