Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Programming stack
Rahul Jain25
asked
in
Programming in C
Oct 7, 2016
retagged
Jul 3, 2019
by
Cristine
625
views
2
votes
2
votes
stack
Rahul Jain25
asked
in
Programming in C
Oct 7, 2016
retagged
Jul 3, 2019
by
Cristine
by
Rahul Jain25
625
views
answer
comment
Follow
share this
share
3 Comments
by
Rahul Jain25
commented
Oct 8, 2016
reply
Follow
share this
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
by
ManojK
commented
Oct 8, 2016
reply
Follow
share this
Is it option B ?
1
1
by
Rahul Jain25
commented
Oct 8, 2016
reply
Follow
share this
in key D os given but i think D is not answer.
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
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$
Arjun
answered
Oct 8, 2016
selected
Oct 8, 2016
by
ManojK
by
Arjun
comment
Follow
share this
3 Comments
by
asu
commented
Oct 8, 2016
reply
Follow
share this
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
by
Rahul Jain25
commented
Oct 8, 2016
reply
Follow
share this
@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
by
Srken
commented
Sep 19, 2022
reply
Follow
share this
What does base 0 means
0
0
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
2
votes
2
votes
3
answers
1
srestha
asked
in
Programming in C
Mar 1, 2019
1,545
views
Programming Stack (ACE)
Runtime stack doesnot contain (A) Local variables (B) Static Variables (C) Parameter Passed (D) Return Address
srestha
asked
in
Programming in C
Mar 1, 2019
by
srestha
1.5k
views
stack
2
votes
2
votes
0
answers
2
CHïntän ÞäTël
asked
in
Programming in C
Dec 7, 2018
436
views
MadeEasy Subject Test 2019: Programming & DS - Stack
I THING THERE IS MISTAKE BECAUSE BRACKET ARE CLOSING AFTER ELEMENT E SO ALL OPERATORS HOULD BE POPED AND AND ACCORDING TO ME ANWER SHOLD BE 2… TRY AND CORRECT IF I M WRONG !!!! THANKS IN ADVANCE!!!
CHïntän ÞäTël
asked
in
Programming in C
Dec 7, 2018
by
CHïntän ÞäTël
436
views
made-easy-test-series
data-structures
stack
infix-prefix
1
vote
1
vote
1
answer
3
shivangi5
asked
in
Programming in C
Dec 12, 2017
630
views
MadeEasy Test Series: Programming & DS - Stack
Options are TI==(P/Q*i-1) Ti==(P/Q*i+1) Ti==(P/Q*(i-1)-1) Ti==(P/Q*(i+1)-1)
shivangi5
asked
in
Programming in C
Dec 12, 2017
by
shivangi5
630
views
made-easy-test-series
data-structures
stack
array
0
votes
0
votes
1
answer
4
rahul sharma 5
asked
in
Programming in C
Dec 19, 2016
421
views
MadeEasy Test Series: Programming & DS - Stack
rahul sharma 5
asked
in
Programming in C
Dec 19, 2016
by
rahul sharma 5
421
views
made-easy-test-series
data-structures
stack
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Programming
(4.1k)
Programming in C
(4.1k)
Programming in Python
(5)
DS
(2.0k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(24)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(682)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.6k
users
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy