Subroutines and Nesting MCQ’s

Computer Architecture Electronics & Communication Engineering

This set of Computer Architecture Multiple Choice Questions & Answers (MCQs) focuses on “Subroutines and Nesting”.

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

2. 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

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

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

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

6. 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

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

8. 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

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

10. The wrong statement/s 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

Leave a Reply

Your email address will not be published. Required fields are marked *