English, asked by anetam046, 8 months ago

the scope of a variable refers to​

Answers

Answered by amitaagarwal4827
1

Answer:

the scope of a variable refers to in which areas or section of a program can the variable be accessed.

mark it as the brainliest answer pleaseeeeee.

Answered by deepanshu67892
0

Answer:

The scope of a variable is the amount of code in which it can be referenced (accessed and modified).

Local variables are those defined within a function.

Local variables and dummy arguments are only valid inside the boundaries of the function in which they are defined. The code in nested functions can access all variables defined in their "parent" function if the function has nested functions.

Global variables are those that are kept in the workspace of MATLAB (also known as global memory).

The command line and all scripts are by default included in the scope of global variables.

The majority of the time, we desire the security (encapsulation) that local variables defined inside of functions offer.

#SPJ3

Similar questions