answersLogoWhite

0


Best Answer

parameter

User Avatar

Myrtice Paucek

Lvl 9
2y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the term used for the variable that receives an argument that passed into a module?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the term used for the variable that receives an argument that is passed into a module?

parameter


When passing an argument by reference the module can modify the argument in the calling part of the program?

Yes, when passing an argument by reference, changes to the argument made within the module will directly affect the original variable in the calling part of the program. This is because the reference to the original variable's memory address is passed to the module, allowing it to modify the variable directly.


What argument value is passed into a module that is the only copy of the argument?

If a module is the sole possessor of a value, it will be passed by value, meaning a copy of the argument will be made and used within the module. This copy will be modified independently of any other modules or the original value.


What is the difference between value type parameters and reference type parameters?

When a variable is passed by value, the function receives a copy of the variable. When a variable is passed by reference, the function receives a reference, or pointer, to the original data.


What happens to the value of a local variable when the module in which the variable is declared completes execution and control is passed to a different module?

The local variable goes away and the value is lost.


When the module can modify the argument in the calling part of the program?

when it is passed by reference


What is data passed to a module is called?

This piece of data is called an "argument".


What variable will capture the content of the argument passed to a script at the command line?

If you read your book, you will find the answer!


What variable will capture the contents of the second argument passed to a script at the command line?

If you read your book, you will find the answer!


Differences between pass by value pass by reference in java?

pass by value is the technique where a copy of the variable is passed to the method as argument. This value can be modified inside the method but that would not affect the original value. Pass by reference is the technique where the reference to the actual variable is passed to the method as argument. Any changes to this variable would affect and alter the original value. Usually primitive data types are passed by value and objects are passed by reference in java.


Which variable will capture the contents of the second argument passed to a script at the command line?

$2Straight from the instructor. kinda simple eh?


How are coupling and cohesion related to modular design?

Ideally, modules will have low coupling and high cohesion. Coupling describes the strength of the connection between modules in a program. Loose (or low) coupling occurs when modules do not depend on other modules. One way to control this is by avoiding the use of global variables and reducing the number of variables that are passed between the modules. Another is to limit the depth of module calls (where a module calls another module, that then calls another module, and so on). Cohesion is a measure of how well a module accomplishes the module's purpose. High cohesion implies that all the module's internal statements serve to perform the module's (single) task. In order for modules to work together, there must be some connection between them. The nature of the connection is important because it determines the extent to which the modules are coupled. How are they connected? The best way to connect them is to pass the value of a local variable in one module to a second module through its parameter list. (A local variable is a variable that is defined within a module (not a parameter) is local to that module. The values of local variables are not available outside of the module in which they are declared unless they are passed. Local variables are reset to their default values once control leaves the module in which they are declared.) Another way to share information is through the use of global variables. (A variable that is defined outside of a module and that does not need to be passed to a module to be accessed by it is a global variable. Global variables retain their value once control leaves the module in which they are referenced. ) Because the value of a global variable can be changed by any module without passing, it increases the coupling between modules.