Sail E0 Webinar
Question
Scope of variable is related to definition of variable as:
1. Region of code within which variable value is valid and hence can be accessed.2. No, relation with region where variable is declared its value is valid in entire scope.
Options:
A .  a
B .  b
C .  a, b
D .  None of the mentioned
Answer: Option A


Scope of variable is the area or region within which variable is declared and hence intialized values of different kind. Based, on which operations of different kinds are carried out on that variable declared within that scope. Its value is preserved until and unless scope of that block ({ })is not expired because as soon as scope gets over. Hence, variable value gets expired. Hence, it's inaccessible after it.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers