πŸ“Š Computer Architecture
Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (C) having one routine call the other

Explanation: none.

πŸ“Š Computer Architecture
Q. The order in which the return addresses are generated and used is
  • (A) lifo
  • (B) fifo
  • (C) random
  • (D) highest priority
πŸ’¬ Discuss
βœ… Correct Answer: (A) lifo

Explanation: that is the routine called first is returned first.

πŸ“Š Computer Architecture
Q. In case of nested subroutines the return addresses are stored in
  • (A) system heap
  • (B) special memory buffers
  • (C) processor stack
  • (D) registers
πŸ’¬ Discuss
βœ… Correct Answer: (C) processor stack

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

πŸ“Š Computer Architecture
Q. The appropriate return addresses are obtained with the help of in case of nested routines.
  • (A) mar
  • (B) mdr
  • (C) buffers
  • (D) stack-pointers
πŸ’¬ Discuss
βœ… Correct Answer: (D) stack-pointers

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

πŸ“Š Computer Architecture
Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (D) all of the mentioned

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

πŸ“Š Computer Architecture
Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (A) general purpose registers

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

πŸ“Š Computer Architecture
Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (B) stacks

Explanation: the stacks are used as logs for return addresses of the subroutines.

πŸ“Š Computer Architecture
Q. The private work space dedicated to a subroutine is called as
  • (A) system heap
  • (B) reserve
  • (C) stack frame
  • (D) allocation
πŸ’¬ Discuss
βœ… Correct Answer: (C) stack frame

Explanation: this work space is where the intermediate values of the subroutines are stored.

πŸ“Š Computer Architecture
Q. If the subroutine exceeds the private space allocated to it then the values are pushed onto
  • (A) stack
  • (B) system heap
  • (C) reserve space
  • (D) stack frame
πŸ’¬ Discuss
βœ… Correct Answer: (A) stack

Explanation: if the allocated work space is exceeded then the data is pushed onto the system stack.

πŸ“Š Computer Architecture
Q. pointer is used to point to parameters passed or local parameters of the subroutine.
  • (A) stack pointer
  • (B) frame pointer
  • (C) parameter register
  • (D) log register
πŸ’¬ Discuss
βœ… Correct Answer: (B) frame pointer

Explanation: this pointer is used to track the current position of the stack being used.

Jump to