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 constructor return a value?
Which is not a valid keyword a) public b) protected c) guarded
Can class objects be passed as function arguments?
What are friend classes?
What are the benefits of oop in c++?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
How to allocate memory dynamically for a reference?
What is polymorphism & list its types in c++?
When must you use a pointer rather than a reference?
What is constructor in C++?
What is #include iostream?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
What is c++ and its features?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Will rust take over c++?