English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Write a note on Local Scope. - Computer Science

Advertisements
Advertisements

Question

Write a note on Local Scope.

Short Note

Solution

  1. A local variable is defined within a block. A block of code begins and ends with curly braces { }.
  2. The scope of a local variable is the block in which it is defined.
  3. A local variable cannot be accessed from outside the block of its declaration.
  4. A local variable is created upon entry into its block and destroyed upon exit.
shaalaa.com
Scope Rules of Variables - Local and Global Variables
  Is there an error in this question or solution?
Chapter 11: Functions - Evaluation - Section - B [Page 205]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 11 Functions
Evaluation - Section - B | Q 5. | Page 205
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×