| 1. |
Discuss the following terms.1. Function prototype2. Actual arguments3. formal arguments4. local variable5. Global variable. |
|
Answer» 1. Function prototype: The declaration of a function before it is used or called is known as function prototype. Ex: int demo (int, int, int); 2. Actual arguments: Actual parameters: the data that is passed by the calling function as arguments/parameters is known as actual arguments, i.e., the arguments which are present at the time of function call. 3. Formal arguments: Formal parameters: are the names of the argument/parameter in the function header of called function. Formal parameter values are used by the called function body. 4. Local (internal) Variables: The variables declared within function block are called local variables. A variable can be used only within the function where it is defined in. Such a variable is accessible only from the function or block in which it is declared. 5. Global Variables: They are the variables that are declared outside of main( ) function body or any other functional block. These variables can be used by all modules and functions in the program. |
|