104k views
4 votes
Correct ________ variables are useful for establishing two-way communication between modules.

1) Value
2) Constant
3) Reference
4) I/O
5) None of these

User Tandra
by
7.9k points

1 Answer

2 votes

Final answer:

Reference variables are the correct option for establishing two-way communication between modules, as they allow changes made to parameters in one module to affect those in the calling module.

Step-by-step explanation:

The correct answer to the question is option 3) Reference. Reference variables are used to establish two-way communication between different program modules or functions. When you pass parameters by reference, any changes made to the parameter in the called function are reflected in the calling function, thereby providing a way to have two-way communication. In contrast, passing parameters by value would only allow one-way communication from the caller to the callee, as changes made to the parameter in the called function do not affect the argument that was passed in by the caller.

User Paul Turchenko
by
7.7k points