Intermediate Code for Function Calls MCQs December 19, 2025December 14, 2024 by u930973931_answers 15 min Score: 0 Attempted: 0/15 Subscribe 1. What is the role of intermediate code in function calls? (A) To directly execute the function (B) To translate the high-level function call into machine-specific code (C) To simplify the function call for further optimization and translation to machine code (D) To verify the function definition 2. In Three-Address Code (TAC), which instruction represents a function call? (A) return (B) push arguments (C) call function_name (D) jump function_name 3. What happens to the arguments of a function in intermediate code during a function call? (A) The arguments are evaluated and pushed onto the stack before the function call (B) The arguments are passed by reference (C) The arguments are passed as immediate values (D) The arguments are ignored 4. How is the return address typically handled in intermediate code for function calls? (A) It is pushed onto the stack before the function call (B) It is ignored during function calls (C) It is stored in a global memory location (D) It is stored in a register 5. What does the return statement in intermediate code represent? (A) It indicates the end of a function (B) It causes the program to jump to the next instruction (C) It computes the result and assigns it to a register or memory location (D) It generates an error if no value is returned 6. Which of the following represents a common sequence of instructions for handling a function call in Three-Address Code (TAC)? (A) t1 = function_name; push return_value (B) push arguments; call function_name; pop arguments (C) call function_name; t1 = return_value (D) t1 = argument1; call function_name; t2 = return_value 7. When a function is called in intermediate code, what happens after the function finishes execution? (A) The function is re-executed (B) The functionâs return value is automatically stored in global memory (C) The program continues execution from the beginning of the function (D) The program jumps to the functionâs return address 8. What does intermediate code for a function call typically include regarding the return value? (A) The return value is not handled in intermediate code (B) A return instruction is generated that assigns the return value to a register or memory (C) The return value is automatically stored in a global variable (D) The return value is directly passed to the calling function 9. In intermediate code for a function call, how are multiple return values handled? (A) The return values are discarded (B) Multiple return values are assigned to different memory locations or registers (C) The return values are stored in an array in memory (D) Only the first return value is stored in the intermediate code 10. What happens to the local variables during a function call in intermediate code? (A) They are stored in registers (B) They are passed back to the calling function (C) They are allocated on the stack and removed once the function returns (D) They are stored in global memory 11. How does intermediate code handle the functionâs return address? (A) The return address is stored in a global memory location (B) The return address is automatically handled by the compiler without any instruction (C) The return address is saved on the stack before the function call (D) The return address is stored in a register 12. In Three-Address Code (TAC), what does the instruction call represent? (A) The beginning of the function body (B) A direct function execution in machine code (C) A return from the function (D) A jump to the functionâs entry point, saving the return address 13. Which of the following is true about handling function calls in intermediate code? (A) The functionâs arguments are pushed onto the stack before the call instruction (B) The compiler generates an unconditional jump to the function (C) The function call does not require any additional handling in intermediate code (D) The return address is passed as an argument 14. How is the function call represented in the intermediate code? (A) As an instruction that directly invokes the function (B) By an instruction that pushes the return address and arguments onto the stack (C) By a jump instruction with the functionâs label (D) By a complex sequence of operations 15. What does the call instruction in intermediate code generally do? (A) It executes the function without saving the return address (B) It transfers control to the function and saves the return address (C) It stores the functionâs return value (D) It starts a loop to check for the return condition