Which of the following array position will be occupied by a new element being pushed for a stack of size N elements

Q & ACategory: Data StructureWhich of the following array position will be occupied by a new element being pushed for a stack of size N elements
Admin Staff asked 4 years ago

Which of the following array position will be occupied by a new element being pushed for a stack of size N elements(capacity of stack > N).
a) S[N-1]
b) S[N]
c) S[1]
d) S[0]

1 Answers
Admin Staff answered 4 years ago

b) S[N]