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

Define Global scope with an example. - Computer Science

Advertisements
Advertisements

प्रश्न

Define Global scope with an example.

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

उत्तर

Global Scope:

A variable that is declared outside of all the functions in a program is known as a global variable. This means a global variable can be accessed inside or outside of all the functions in a program. Consider the following example 

On execution of the above code the variable a which is defined inside the function displays the value 7 for the function call Disp( ) and then it displays 10 because a is defined in the global scope.

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×