# Mphasis Stack and Queue Quiz 1

Question 1

Time: 00:00:00
How many passes does the evaluation of infix expression algorithm makes through the input?

3

3

2

2

1

1

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 2

Time: 00:00:00
Consider the given conditions in regards to the circular queue
1) (FRONT = 0) and (REAR =CAPACITY - 1)
2) FRONT = REAR
3)FRONT = CAPACITY-- REAR
Which of the above conditions tests the overflow condition of a circular queue?

Only l

Only l

Only2

Only2

Only 3

Only 3

Both l and 2

Both l and 2

Both l and 3

Both l and 3

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 3

Time: 00:00:00
Group A

Group B
1. Constant
2. Arrays
3. Loops
4. Pointers

1) A-4.B-3, C-2, D-1

1) A-4.B-3, C-2, D-1

A-3.B-2, C-4, D-1

A-3.B-2, C-4, D-1

A-2,B-1,C-4,D-3

A-2,B-1,C-4,D-3

A-4,B-1,C-2,D-3

A-4,B-1,C-2,D-3

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 4

Time: 00:00:00
Stack is useful for implementing

Recursion

Recursion

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 5

Time: 00:00:00
Which of the following data structure may give overflow error, even though the current number of element in it is less than its size?

Queue implemented in a linear array

Queue implemented in a linear array

Queue implemented in a circularly connected array

Queue implemented in a circularly connected array

Stack implemented in a linear array

Stack implemented in a linear array

none of these

none of these

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 6

Time: 00:00:00
A is an empty stack. The following operations are done on it.
PUSH(1)
PUSH(2)
POP
PUSH(5)
PUSH(6)
POP
What will the stack contain after these operations. (Top of the stack is underlined)

_5_ 6

_5_ 6

1 _5_

1 _5_

_5_ 6

_5_ 6

_1_ 5

_1_ 5

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 7

Time: 00:00:00
A stack is implemented as a linear array A[0…N-1]. Noor writes the following functions for popping
an element from the stack.
```function POP( top, N )
{
if(X)
{
top = top - 1
}
else
{
print "Underflow"
}
}```

Fill in the condition X

top< N-1

top< N-1

top<n

top<n

top>1

top>1

top >= 0

top >= 0

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 8

Time: 00:00:00
How many stack/s need for implementing a queue?

2

2

3

3

1

1

5

5

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 9

Time: 00:00:00
A queue is implemented by a linear array of size 10 (and not as a circularly connected array). Front and Rear are represented as an index in the array. To add an element, the rear index is incremented and the element is added. To delete an element, the front index is incremented. The following operations are done on an empty queue.
After this set of operations, what is the maximum capacity of the queue?

6

6

7

7

10

10

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 10

Time: 00:00:00
How many arrays are required to implement a priority queue?

1

1

2

2

3

3

4

4

Once you attempt the question then PrepInsta explanation will be displayed.

Start

["0","40","60","80","100"]
["Need more practice! \r\n \r\n","Keep trying! \r\n \r\n","Not bad! \r\n \r\n","Good work! \r\n \r\n","Perfect! \r\n \r\n"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%

Prime Video

#### Prime Video

Complete Video Course for Mphasis

For Mphasis
Prime Video

Prime Mock

#### Prime Mock

Topic-Wise Full Mock and much more

For Mphasis
Prime Mock