Topic Wise Solved Problems Question – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
CPP All :Topicwise Exam Questions: stacks siteicon
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[20]; char TITLE[80];
  TEXTBOOKS *Link;
};
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
{
  int GCODE;         //Gift Code
  char GDESC[20];    //Gift Description
  GIFT *Link;
};
class STACK
{
  Gift *TOP;
public:
  STACK(){TOP=NULL;}
  void PUSHGIFT();
  void POPGIFT();
  ~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[20], TITLE[80];
  BOOKS *Link;
};
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