Engineering Questions with Answers - Multiple Choice Questions

Microprocessors MCQ – Stack

1 - Question

The Stack follows the sequence
a) first-in-first-out
b) first-in-last-out
c) last-in-first-out
d) last-in-last-out

View Answer

Answer: c
Explanation: The stack follows last-in-first-out sequence.




2 - Question

If the processor is executing the main program that calls a subroutine, then after executing the main program up to the CALL instruction, the control will be transferred to
a) address of main program
b) subroutine address
c) address of CALL instruction
d) none of the mentioned

View Answer

Answer: b
Explanation: Since subroutine is called, to start the execution of the subroutine, the control is transferred to the subroutine address.




3 - Question

The stack is useful for
a) storing the register status of the processor
b) temporary storage of data
c) storing contents of registers temporarily inside the CPU
d) all of the mentioned

View Answer

Answer: d
Explanation: Stack is used for temporary storage of contents of registers and memory locations, status of registers.




4 - Question

The Stack is accessed using
a) SP register
b) SS register
c) SP and SS register
d) None of the mentioned

View Answer

Answer: c
Explanation: The stack is accessed using a pointer that is implemented using SP and SS registers.




5 - Question

As the storing of data words onto the stack is increased, the stack pointer is
a) incremented by 1
b) decremented by 1
c) incremented by 2
d) decremented by 2

View Answer

Answer: d
Explanation: The data is stored from top address of the stack and is decremented by 2.




6 - Question

While retrieving data from the stack, the stack pointer is
a) incremented by 1
b) incremented by 2
c) decremented by 1
d) decremented by 2

View Answer

Answer: b
Explanation: The data in the stack, may again be transferred back from a stack to register. At that time, the stack pointer is incremented by 2.




7 - Question

The process of storing the data in the stack is called ……… the stack.
a) pulling into
b) pulling out
c) pushing into
d) popping into

View Answer

Answer: c
Explanation: The data is pushed into the stack while loading the stack.




8 - Question

The reverse process of transferring the data back from the stack to the CPU register is known as
a) pulling out the stack
b) pushing out the stack
c) popping out the stack
d) popping off the stack

View Answer

Answer: d
Explanation: The data retrieved from stack is called popping off.




9 - Question

The books arranged one on the other on a table is an example of
a) queue
b) queue and first-in-first out
c) stack
d) stack and last-in-first-out

View Answer

Answer: d
Explanation: If the books are arranged one on the other, then the book that is placed last will be the first out.




10 - Question

The PID temperature controller using 8086 has
a) data flow
b) data flow and uses queue
c) sequential flow
d) sequential flow and uses stack

View Answer

Answer: d
Explanation: Since PID temperature controller has steps that need to be sequentially executed such as sampling the output, conversion of a signal with ADC, finding errors, deriving control signals and applying the control signal to control flow of energy.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners