Topic Wise Solved Problems Question – Computer Sir Ki Class  CPP All :Topicwise Exam Questions: stacks
03E 2

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
P + ( Q – R ) * S / T

CBSE12D-2017

03E-2016 2

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
A/(B+C)*D-E

CBSE12D-2016

03C 4

Write the definition of a member function Pop() in C++, to delete a book from a dynamic stack of TEXTBOOKS considering the following code is already included in the program.

```struct TEXTBOOKS
{
char ISBN; char TITLE;
};
class STACK
{
TEXTBOOKS *Top;
public:
STACK() {Top=NULL;}
void Push();
void Pop();
~STACK();
};```
CBSE12D-2015

03E 2

Convert the following infix expression to its equivalent postfix expression, showing the stack contents for each step of conversion.
X / Y + U* (V-W)

CBSE12D-2015

03E 2

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion:
U * V + (W – Z) / X

CBSE12A-2018

03D 4

Write the definition of a member function PUSHGIFT() for a class STACK in C++, to add a GIFT in a dynamically allocated stack of GIFTs considering the following code is already written as a part of the program:

```struct GIFT
{
};
class STACK
{
public:
STACK(){TOP=NULL;}
~STACK();
};```
CBSE12A-2017

03E 2

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion:
X – ( Y + Z ) / U * V

CBSE12A-2017

03E 2

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.

P/(QR)*S+T

CBSE12A-2016

03C-2015 4

Write the definition of a member function PUSH() in C++, to add a new book in a dynamic stack of BOOKS considering the following code is already included in the program:

```struct BOOKS
{
char ISBN, TITLE;
};
class STACK
{
BOOKS *Top;
public:
STACK()
{Top=NULL;}
void PUSH();
void POP();
~STACK();
};```
CBSE12A-2015

03E-2015 2

Convert the following infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
U * V + R/ (S-T)

CBSE12A-2015