1.

What Is The Difference Between Global Variables And Static Variables?

Answer»
  • The SCOPE of the variable describes that the variable is accessible at certain point in the program or not.
  • The DIFFERENCE between global variables and static variables LIES in this concept only. 
  • The scope of the global variables remains through out the program also the life SPAN of these variables is through out the program.
  • The scope of the static Variables remains within the BLOCK of code in which they are created but the life span remains through out the program.
  • Thus, the main difference is between the scope of both type of variables.



Discussion

No Comment Found