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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?