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 #include iomanip?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
What is the fastest c++ compiler?
What is an adaptor class or wrapper class in c++?
What is the most common mistake on c++ and oo projects?
List the features of oops in c++?
What are register variables?
What does the ios::ate argument do?
What is the best ide for c++?
What should main() return in c and c++?
What can c++ be used for?
Write a program to show polymorphism in C++?
Write about the various sections of the executable image?
Which of the following is evaluated first: a) && b) || c) !
What do you understand by pure virtual function? Write about its use?