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

Define Local scope with an example. - Computer Science

Advertisements
Advertisements

प्रश्न

Define Local scope with an example.

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

उत्तर

Local Scope:

Local scope refers to variables defined in the current function. Always, a function will the first lookup for a variable name in its local scope. Only if it does not find it there, the outer scopes are checked.

Look at this example

On execution of the above code, the variable a displays the value 7, because it is defined and available in the local scope.

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×