Which of the following applications may use a stack? (A) Parenthesis balancing…
2018
Which of the following applications may use a stack? (A) Parenthesis balancing program (B) Process scheduling in operating system (C) Conversion of infix arithmetic expression to postfix form
- A.
(A) and (B)
- B.
(B) and (C)
- C.
(A) and (C)
- D.
(A), (B) and (C)
Attempted by 1447 students.
Show answer & explanation
Correct answer: C
A stack is a linear data structure that follows the LIFO (Last In First Out) principle. Applications of stack include: Parenthesis balancing, where opening and closing brackets are matched.
Expression conversion, such as converting infix expressions to postfix form.
Process scheduling in an operating system uses a queue, not a stack. Hence, the correct answer is (A) and (C).