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


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.


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

when it is passed by reference


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.


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.


What is a variable that is used within a function?

If the variable is declared within the function body, it is a local variable, one that is local to the function. Local variables fall from scope when the function returns, they are only accessible within the function. However, local variables can be returned by value, which creates an automatic variable that is returned to the caller. If the caller does not store the return value, the automatic variable falls from scope when the expression containing the function call ends. However, the expression may evaluate the return value without storing it. Note that functions cannot return local variables by reference since the local variable falls from scope when the function returns. If the variable is passed as an argument to the function, then the variable is a parameter of the function. Arguments may be passed by value or by reference, depending upon the function signature. Passing by value means the function parameter is a copy of the argument (if the argument is an object, the object's copy constructor is invoked automatically). Thus any changes made to the parameter within the function are not reflected in the argument that was originally passed, and the parameter will fall from scope when the function returns. However, the value of the parameter can be returned as previously explained. Passing by reference means the function parameter refers directly to the argument that was passed. Thus any changes made to the parameter are reflected in the argument. Parameters that are declared as constant references assure the caller that the reference's immutable members will not be altered by the function. If the parameter is a non-const reference but the caller does not wish changes to be reflected in the argument, the caller should pass a copy of the argument instead.


How can called function determine number of arguments that have been passed to it in C language?

use the variable length argument - va_arg va_list ca_start and va_end macros