Stack Operations – 1 Multiple Questions and Answers.

11.What is the postfix form of the following prefix expression -A/B*C$DE
A. ABCDE$*/-
B. A-BCDE$*/-
C. ABC$ED*/-
D. A-BCDE$*/

12.The data structure required to check whether an expression contains balanced parenthesis is:
A. Queue
B. Tree
C. Stack
D. Array

13.The postfix form of A*B+C/D is:
A. *AB/CD+
B. AB*CD/+
C. A*BC+/D
D. ABCD+/ *

14. If memory for the run-time stack is only 150 cells(words), how big can N be in Factorial(N) before encounterring stack overflow?
A. 24
B. 12
C. 26
D. 50

15.Using Pop (S1,Item) ,Push(S1, Item), Getlist(Item), Pop(S2,Item), and the variables S1,S2(stacks with Top1 and Top2) and Item and given the input file: A,B,C,D,E,F Which stack are possible?
A. All possible stacks with A,B,C,D,E and F
B. No possible stacks with A,B,C,D,E and F
C. Exact and only those stacks which can be produced with S1 alone
D. Twice as many stacks as can be produced with S1 alone


Quick Links

GAT Subject

   Computer Science    English    Agriculture    Botany    


   Computer Science    Civil Engineering    


   Networking    Electronics    Database    

Past Papers

   Model Papers    FPSC    PPSC    NTS