Computer Architecture Questions and Answers Part-10

1. The return address of the Sub-routine is pointed to by _______
a) IR
b) PC
c) MAR
d) Special memory registers

Answer: b
Explanation: The return address from the subroutine is pointed to by the PC.

2. The location to return to, from the subroutine is stored in _______
a) TLB
b) PC
c) MAR
d) Link registers

Answer: d
Explanation: Link registers

3. What is subroutine nesting?
a) Having multiple subroutines in a program
b) Using a linking nest statement to put many subroutines under the same name
c) Having one routine call the other
d) None of the mentioned

Answer: c
Explanation: Having one routine call the other

4. The order in which the return addresses are generated and used is _________
a) LIFO
b) FIFO
c) Random
d) Highest priority

Answer: a
Explanation: That is the routine called first is returned first.

5. In case of nested subroutines the return addresses are stored in __________
a) System heap
b) Special memory buffers
c) Processor stack
d) Registers

Answer: c
Explanation: In this case, there will be more number of return addresses it is stored on the processor stack.

6. The appropriate return addresses are obtained with the help of ____ in case of nested routines.
a) MAR
b) MDR
c) Buffers
d) Stack-pointers

Answer: d
Explanation: The pointers are used to point to the location on the stack where the address is stored.

7. When parameters are being passed on to the subroutines they are stored in ________
a) Registers
b) Memory locations
c) Processor stacks
d) All of the mentioned

Answer: d
Explanation: In the case of, parameter passing the data can be stored on any of the storage space.

8. The most efficient way of handling parameter passing is by using ______
a) General purpose registers
b) Stacks
c) Memory locations
d) None of the mentioned

Answer: a
Explanation: By using general purpose registers for the parameter passing we make the process more efficient.

9. The most Flexible way of logging the return addresses of the subroutines is by using _______
a) Registers
b) Stacks
c) Memory locations
d) None of the mentioned

Answer: b
Explanation: The stacks are used as Logs for return addresses of the subroutines.

10. The wrong statement regarding interrupts and subroutines among the following is/are ______
i) The sub-routine and interrupts have a return statement
ii) Both of them alter the content of the PC
iii) Both are software oriented
iv) Both can be initiated by the user
a) i, ii and iv
b) ii and iii
c) iv
d) iii and iv

Answer: d
Explanation: iii and iv