Computer Science, asked by shamiq1810, 1 year ago

Name the region of code within which a variable is accessible.

Answers

Answered by flower161
5
the region of code within which a variable is accessible is called a block or function.


Answered by letmeanswer12
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