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
What is the this pointer?
What is a string example?
What is virtual base class?
What is the first name of c++?
What is using namespace std in c++?
Define pre-condition and post-condition to a member function in c++?
What is a pointer with example?
How can a called function determine the number of arguments that have been passed to it?
What is the best free c++ compiler for windows?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
How a new operator differs from the operator new?
Explain the difference between using macro and inline functions?
What is protected inheritance?
How do I use arrays in c++?
Can we specify variable field width in a scanf() format string? If possible how?