Which statement is false ?

2022

Which statement is false ?

  1. A.

    All function calls in C pass arguments using call by value.

  2. B.

    Call by reference enables a called function to modify a variable in calling function.

  3. C.

    Call by value is always more efficient than call by reference.

  4. D.

    Programmers use pointers and indirection operation to simulate call by reference.

Attempted by 790 students.

Show answer & explanation

Correct answer: C

Answer (false statement): Call by value is always more efficient than call by reference.

Explanation:

  • The statement is false because efficiency depends on what is being passed. For small primitive values (for example, int or char), passing by value is usually cheap. For large structures or arrays, copying the entire value can be costly in time and memory.

  • Passing by reference (or passing a pointer to the data) avoids copying large amounts of data and can be more efficient. However, it introduces aliasing and potential safety issues, so it is not universally better.

  • C-specific note: C uses call-by-value for all arguments. To allow a function to modify caller data, programmers pass a pointer (the address) and dereference it inside the function; this simulates call-by-reference.

  • Conclusion: Because the word "always" makes the claim unconditional and real-world performance depends on context, the statement is false.

Practical guidance:

  • Prefer pass-by-value for small, inexpensive-to-copy data where safety and simplicity matter.

  • Use pointers (pass-by-reference style) for large data or when you need the function to modify the caller's data without copying.

  • Always weigh performance against clarity and safety (consider const pointers to prevent unintended modification).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor