Parameter Passing Methods MCQs December 19, 2025December 14, 2024 by u930973931_answers 30 min Score: 0 Attempted: 0/30 Subscribe 1. Which of the following is a method of parameter passing? (A) All of the above (B) Call by reference (C) Call by result (D) Call by value 2. In call by value, what happens to the actual parameter? (A) Its value is copied to the function parameter (B) It is directly modified by the function (C) A reference to the actual parameter is passed (D) It is not used at all 3. Which parameter passing method allows the function to modify the actual parameter? (A) Call by value (B) Call by constant (C) Call by name (D) Call by reference 4. What is the main disadvantage of call by reference? (A) Cannot modify actual parameter (B) May lead to unintended side-effects (C) Slower execution due to copying (D) Uses more memory 5. In call by result, when is the actual parameter updated? (A) Before function execution (B) After function execution (C) During function execution (D) Never 6. Call by value-result is also known as: (A) Call by constant (B) Call by reference (C) Call by name (D) Call by copy-in, copy-out 7. Which of the following is true about call by name? (A) Actual parameter is copied once (B) Actual parameter is evaluated every time it is used in the function (C) Actual parameter is never modified (D) Parameter must be a constant 8. Call by constant reference is mainly used to: (A) Make a copy of the parameter (B) Increase execution time (C) Prevent the function from modifying the parameter (D) Evaluate the parameter multiple times 9. Which parameter passing method is typically fastest for primitive data types? (A) Call by reference (B) Call by name (C) Call by value (D) Call by result 10. Which method is safest for passing large data structures without copying them? (A) Call by value (B) Call by reference (C) Call by result (D) Call by name 11. In call by reference, what is passed to the function? (A) Copy of the value (B) Memory address of the actual parameter (C) None of the above (D) Constant reference 12. Which parameter passing method may lead to repeated evaluation of the actual parameter? (A) Call by value (B) Call by name (C) Call by reference (D) Call by result 13. In call by value-result, when is the copy-back performed? (A) At the end of the function (B) At the start of the function (C) At compile time (D) During each statement execution 14. Which parameter passing method is commonly used in C++ for efficiency with large objects? (A) Call by constant reference (B) Call by reference (C) Call by name (D) Call by value 15. What happens if a function modifies a parameter passed by value? (A) Only the copy inside the function is modified (B) Actual parameter is also modified (C) Compiler throws an error (D) Memory is leaked 16. Call by result is similar to: (A) Call by value (B) Output parameters (C) Call by reference (D) Call by name 17. Which parameter passing method is mostly used in functional programming languages? (A) Call by value (B) Call by name (C) Call by reference (D) Call by result 18. Which of the following methods requires temporary storage to copy back the result? (A) Call by value (B) Call by result (C) Call by reference (D) Call by constant 19. Which method is suitable when you want to pass a constant object to a function? (A) Call by reference (B) Call by result (C) Call by value (D) Call by constant reference 20. In call by value-result, what happens if the same variable appears twice in the argument list? (A) Error occurs (B) Second copy overwrites first (C) Only first copy is updated (D) Updates may be unpredictable due to copy-back 21. Which parameter passing method is commonly used in Java? (A) Call by reference (B) Call by name (C) Call by value (D) Call by result 22. In call by name, the actual parameter is: (A) Substituted as a textual expression (B) Copied once at entry (C) Stored in memory only once (D) Never evaluated 23. Which parameter passing method may cause “aliasing” issues? (A) Call by value (B) Call by result (C) Call by reference (D) Call by constant reference 24. Call by reference is equivalent to: (A) Passing the memory address (B) Passing a copy (C) Evaluating expressions lazily (D) Passing a constant pointer 25. Which method prevents the function from modifying the caller’s variables while avoiding copying large data? (A) Call by value (B) Call by name (C) Call by result (D) Call by constant reference 26. Call by value-result can be viewed as a combination of: (A) Call by value and call by result (B) Call by value and call by reference (C) Call by reference and call by name (D) Call by result and call by name 27. Which method may produce side effects if the function modifies global objects indirectly? (A) Call by value (B) Call by reference (C) Call by result (D) Call by constant reference 28. Which method is generally easiest to implement in the compiler? (A) Call by reference (B) Call by value (C) Call by result (D) Call by name 29. Which parameter passing method is least efficient for large data structures? (A) Call by value (B) Call by reference (C) Call by constant reference (D) Call by result 30. Why is call by constant reference preferred in C++ for large objects? (A) To allow modification (B) To prevent copying while keeping object read-only (C) To simplify code (D) To allow multiple copies