237 views
0 votes
0 votes

I think both are True But i m not 100% sure .Please tell if any false?

what is base pointer?

1 Answer

1 votes
1 votes

1.Stack pointer : it points always the top of satck.

 Base pointer : it points the begning of the current  fuction.

not in all architecture but in some architecture stack grows in  downward  direction.

now , when stack pointer=base pointer then is the satck empty?

stack grows downwards so if  we push any value in the satck then it will reduce the address bcz it is growing downward. now to make it equal we need to pop the values then incrementation  will occur .

so i think 1st option is true .

2. not usually but in some architecture stack grows downwards.

(see the link once it might be helpful.

https://www.quora.com/What-is-the-logical-explanation-for-stacks-typically-growing-downward-and-heaps-growing-upward)

please correct if i am wrong anywhere

Related questions

0 votes
0 votes
1 answer
1
Abhrajyoti00 asked Oct 29, 2022
718 views
Can there be “Stack Overflow” in Linked list Implementation of stack? If Yes, how?