Advertisements
Advertisements
प्रश्न
Write a note on Local Scope.
टिप्पणी लिखिए
उत्तर
- A local variable is defined within a block. A block of code begins and ends with curly braces { }.
- The scope of a local variable is the block in which it is defined.
- A local variable cannot be accessed from outside the block of its declaration.
- A local variable is created upon entry into its block and destroyed upon exit.
shaalaa.com
Scope Rules of Variables - Local and Global Variables
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?