English

Why scope should be used for variable. State the reason.

Advertisements

Question

Why scope should be used for variable. State the reason.

Short/Brief Note
Advertisements

Solution

Essentially, variables are addresses (references, or pointers), to an object in memory. When you assign a variable with := to an instance (object), you’re binding (or mapping) the variable to that instance. Multiple variables can be mapped to the same instance.

shaalaa.com
Variable Scope
  Is there an error in this question or solution?
Chapter 3: Scoping - Evaluation [Page 29]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 3 Scoping
Evaluation | Q 2. | Page 29
Advertisements
Share
Notifications



      Forgot password?
Use app×