हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा १२

Define the Enclosed scope with an example.

Advertisements
Advertisements

प्रश्न

Define the Enclosed scope with an example.

टिप्पणी लिखिए
Advertisements

उत्तर

Enclosed Scope:

All programming languages permit functions to be nested. A function (method) within another function is called a nested function. A variable that is declared inside a function that contains another function definition within it, the inner function can also access the variable of the outer function. This scope is called the enclosed scope. When a compiler or interpreter search for a variable in a program, it fist search Local and then search Enclosing scopes. Consider the following example

shaalaa.com
Types of Variable Scope
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: Scoping - Evaluation [पृष्ठ २९]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
अध्याय 3 Scoping
Evaluation | Q 3. | पृष्ठ २९
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×