मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता १२

Identify the scope of the variables in the following pseudo-code and write its output color:= Red mycolor(): b:=Blue myfavcolor(): g:=Green printcolor, b, g myfavcolor() printcolor, b mycolor() - Computer Science

Advertisements
Advertisements

प्रश्न

Identify the scope of the variables in the following pseudo-code and write its output
color:= Red
mycolor():
  b:=Blue
 myfavcolor():
     g:=Green
     printcolor, b, g
 myfavcolor()
 printcolor, b
mycolor()
print color

टीपा लिहा
Advertisements

उत्तर

Scopes:
g – Local scope
b – Enclosed scope
color – Global scope

Output:

Red Blue Green
Red Blue
Red

shaalaa.com
Variable Scope
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 3: Scoping - Evaluation [पृष्ठ ३०]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
पाठ 3 Scoping
Evaluation | Q 5. | पृष्ठ ३०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×