in Programming in C retagged by
625 views
2 votes
2 votes

Loading Question

in Programming in C retagged by
625 views

3 Comments

here what does w.r.t to Top means. Pop operation removes top element.  so value of I should be 0 or 1????
0
0
Is it option B ?
1
1
in key D os given but i think D is not answer.
0
0

1 Answer

6 votes
6 votes
Best answer
If we need to get $I^{th}$ element from Top, we require at least $I$ element in stack. So, $Top \geq I$ and underflow condition is $Top < I \\ \implies Top+1 \leq I \\ \implies Top -I+1 \leq 0$
selected by
by

3 Comments

supppose we have n=5 element,,and bottom of stack is 0 so top will be 4,,,now we want to delete 5th element wrt top(that is 0th element) now

top-i+1=4-5+1=0

so 0<=0 but no underflow....after this it can be underflow
1
1
@Arjun sir, if stack contains a,b,c,d,e,f and base-0 which contains a, and top will be be pointing to f, then what will be the 1 st elemtent wrt to top.??? e or f???
0
0
What does base 0 means
0
0
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true