Difference between static global and global?
Answer Posted / ravi.g
local static variable and global variable both are same
since both can be accessed from all the functions in the
same file in which they declared.
Global variable has the file scope since it can be accessed
from other files also by using extern keyword.
Local static vaeriables have no file scope since they can
not be accessed from other files by any means.
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Do class declarations end with a semicolon? Do class method definitions?
How does code-bloating occur in c++?
When is the destructor called?
Why main function is special in c++?
How many different levels of pointers are there?
Describe new operator?
Why do we use templates?
Describe the syntax of single inheritance in C++?
What is bubble sort c++?
What does the linker do?
What is the use of data hiding?
Can a program run without main in c++?
What are mutator methods in c++?
Is there finally in c++?
What is a class template in c++?