Difference between static global and global?
Answer Posted / sandeep gautham
a program can be spread across two or more files...
so, a global variable can be accessed by all the files..
where as, a static global variable can be accessed only by
the file in which it is declared...static means permanent
and hence the value in static global variable is shared by
all the functions in that file...
Is This Answer Correct ? | 35 Yes | 5 No |
Post New Answer View All Answers
Can a class be static in c++?
How are virtual functions implemented in c++?
What are the extraction and insertion operators in c++?
What is problem with overriding functions?
How to tokenize a string in c++?
Explain about Garbage Collector?
Can class objects be passed as function arguments?
What is array in c++ pdf?
What is data abstraction? How is it different from data encapsulation?
How const int *ourpointer differs from int const *ourpointer?
Can user-defined object be declared as static data member of another class?
What is the need of a destructor? Explain with the help of an example.
What is the difference between a declaration and a definition?
What is recursion?
What are guid? Why does com need guids?