- #1
Thread Owner
Assume that stack grows towards lower addresses. Also assume that variables are pushed on to the stack in the order in which they are declared.
main()
{
int x, y ;
int *p1 = &x;
int *p2 = &y;
printf("%d\n", (int)p1-(int)p2);
}
main()
{
int x, y ;
int *p1 = &x;
int *p2 = &y;
printf("%d\n", (int)p1-(int)p2);
}