Name the region of code within which a variable is accessible.
Answers
Answered by
5
the region of code within which a variable is accessible is called a block or function.
Answered by
5
Scope is a region of a program. Variable Scope is a region in a program where a variable is declared and used.
Explanation:
- Variables are of two types depending on the region where these are declared and used.
- Variables declared within a function or block are referred to as local variables, and are said to have local scope. The local variables can only be available within the function or block in which these are declared.
- Variables defined outside of all functions and accessible throughout the program are global variables and are said to have a global scope.
Similar questions
English,
8 months ago
Hindi,
8 months ago
Math,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago