# Computer-Bachelor of Computer Applications MCQs set/1 Sample Test,Sample questions

1.True

2.False

1.true

2.false

## Question: Consider the stack | 5 | | 4 | | 3 | | 2 |. At this point, â€˜*â€™ is encountered. What has to be done?

1.5*4=20 is pushed into the stack

2.* is pushed into the stack

3.2*3=6 is pushed into the stack

4.* is ignored

## Question: Entries in a stack are â€œorderedâ€. What is the meaning of this statement?

1.A collection of stacks is sortable

2.Stack entries may be compared with the â€˜<â€˜ operation

3.The entries are stored in a linked list

4.There is a Sequential entry that is one by one

1.1

2.4

3.5

4.2

1.6

2.8

3.9

4.7

1.3

2.6

3.5

4.4

1.10

2.11

3.16

4.12

1.23

2.15

3.6

4.10

1.True

2. False

1.one

2.two

3.three

4.four

1.One

2.Two

3.Three

4. Four

1.one

2.two

3.three

4.four

1.one

2.two

3.three

4.four

1.one

2.two

3.three

4.four

## Question: Identify the infix expression from the list of options given below.

1.a/b+(c-d)

2.abc*+d+ab+cd+*ce-f-

3.ab-c-

4.+ab

## Question: If -*+abcd = 11, find a, b, c, d using evaluation of prefix algorithm.

1.a=2, b=3, c=5, d=4

2. a=1, b=2, c=5, d=4

3.a=5, b=4, c=7,d=5

4.a=1, b=2, c=3, d=4

## Question: If the corresponding end bracket/braces/parentheses is encountered, which of the following is done?

1.push it on to the stack

2.pop the stack

3.throw an error

4.treated as an exception

## Question: In a stack, if a user tries to remove an element from an empty stack it is called _________

1.Underflow

2.Empty collection

3.Overflow

4.Garbage Collection

## Question: In balancing parentheses algorithm, the string is read from?

1.right to left

2.left to right

3.center to right

4.center to left

1.True

2.False

1.True

2.False

1.^

2.+

3./

4.#

1.True

2.False

1.+

2.\$

3. ^

4.&

1.+

2.\$

3.|

4.&

1.Overflow

2.Crash

3.Underflow

4.User flow

1.True

2.False

1.True

2.False

1.True

2.False

1.True

2.False

1.12

2.8

3.10

4.6

1.10

2.4

3.17

4.14

1.Stack

2.Queue

3.B-Trees

## Question: What determines the order of evaluation of a prefix expression?

1.precedence and associativity

2.precedence only

3.associativity only

4.depends on the parser

## Question: What is the other name for a postfix expression?

1.Normal polish Notation

2.Reverse polish Notation

3.Warsaw notation

4.Infix notation

1.16

2.12

3.14

4.10

1.4

2.5

3.6

4.7

1.O(1)

2.O(n)

3.O(logn)

4.O(nlogn)

## Question: What should be done when an opening parentheses is read in a balancing symbols algorithm?

1.push it on to the stack

2.throw an error

3.ignore the parentheses

4.pop the stack

## Question: When an operand is read, which of the following is done?

1.It is placed on to the output

2.It is placed in operator stack

3.It is ignored

4.Operator stack is emptied

## Question: When the corresponding end bracket/braces/parentheses is not found, what happens?

1.The stack is popped

2.Ignore the parentheses

3.An error is reported

4.It is treated as an exception

## Question: Which application of stack is used to ensure that the pair of parentheses is properly nested?

1.Balancing symbols

2.Reversing a stack

3.Conversion of an infix to postfix expression

4.Conversion of an infix to prefix expression

1.a*b(c+d)

2.abc*+de-+

3.+ab

4.a+b-c

## Question: Which of the following is not an application of stack?

1.evaluation of postfix expression

2.conversion of infix to postfix expression

3.balancing symbols

4.line at ticket counter

1.{[()]}

2.([ )]

3.{( )}

4.{ [ ] }

## Question: Which of the following statement is incorrect with respect to evaluation of infix expression algorithm?

1.Operand is pushed on to the stack

2.If the precedence of operator is higher, pop two operands and evaluate

3.If the precedence of operator is lower, pop two operands and evaluate

4.The result is pushed on to the operand stack

## Question: Which of these operators have the highest order of precedence?

1.â€˜(â€˜ and â€˜)â€™

2.â€˜*â€™ and â€˜/â€™

3. â€˜~â€™ and â€˜^â€™

4.â€˜+â€™ and â€˜-â€˜

## Question: While evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?

1.push it directly on to the stack

2.pop 2 operands, evaluate them and push the result on to the stack

3.pop the entire stack

4.ignore the operator

## Question: While evaluating a prefix expression, the string is read from?

1.left to right

2.right to left

3.center to right

4.center to left to right

## More MCQS

##### Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!