Which of the following applications may use a stack? (a) Parenthesis balancing program (b) Process scheduling operating system (c) Conversion of infix arithmetic expression to postfix form

Which of the following applications may use a stack? (a) Parenthesis balancing program (b) Process scheduling operating system (c) Conversion of infix arithmetic expression to postfix form Correct Answer (a) and (c)

Stack:

  • Stack is a data structure which possesses the LIFO property i.e. last in first out. The element which inserted at the last will come out first from the stack.
  • Two operations that can be performed on the stack are Push and Pop.
  • Push is used to insert element into the stack and pop operation is used to remove element from the top of the stack.


Applications of stack:

1) Expression conversion such as infix to postfix, infix to prefix.

2) Expression evaluation

3) Parsing well-formed parenthesis

4) Decimal to binary conversion

5) Reversing a string

6) Storing function calls

Note:

Queue data structure is used for process scheduling operating system. 

Related Questions

Given two processes (conversion of postfix equation to infix notation and conversion of prefix notation to infix notation), which of the following is easier to implement?
A Windows 2000 Server computer named server2 runs numerous 32bit applications and two 16bit applications. Users start the 16bit applications by running APP1.EXE for one application and APP2.EXE for another application. The 16bit applications are configured to run in the separate memory space. You want to create a performance base like chart in the system monitor for all the applications on server2. You add all of 32bit applications and now you want to add two 16bit applications. What should you do?