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 are the advantages of c++?
What is #include math h in c++?
What are the different types of comments allowed in c++?
When should you use global variables?
Write about an iterator class?
What is polymorphism & list its types in c++?
What are the advantages of using a pointer?
What is do..while loops structure?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
How would you use qsort() function to sort an array of structures?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
How can you quickly find the number of elements stored in a dynamic array?
which of the following is not an secondary constant a) array b) real c) union
Is c++ an oop?
C is to C++ as 1 is to a) What the heck b) 2 c) 10