Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Static variable and global variable (http://www.go4expert.com/forums/static-variable-global-variable-t1746/)

prem_may10 28Oct2006 19:46

Static variable and global variable
what is static variable, globale variable?

what is the difference between static variable & globale variable

yasodhar premchand

shabbir 29Oct2006 10:33

Re: Static variable and global variable
Try giving a better heading to your queries so that it helps others to search as well as experts can understand it while seeing the title. I have edited the title for this thread.

Static Variable

A variable that exists in only one location and is globally accessible by all instances of a class and also a variable for which memory remains allocated as long as the program executes.

Global Variable

A variable that can be accessed by all parts of a program so it does not belong to any subroutine in particular and can therefore can be accessed from any context in a program

All times are GMT +5.5. The time now is 03:45.