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
What are protected members in c++?
What is the difference between prefix and postfix versions of operator++()?
Explain deep copy?
What jobs can you get with a c++ certification?
When is the copy constructor called?
What is == in programming?
What is #include c++?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
What is the history of c++?
Write about a nested class and mention its use?
What does ios :: app do in c++?
Is rust better than c++?
Can a function take variable length arguments, if yes, how?
Can non-public members of another instance of the class be retrieved by the method of the same class?
How can virtual functions in c++ be implemented?