what is difference between static and non-static variables
Answer Posted / achal ubbott
The above answers are correct. A local static variable is
stored in heap. But a local variable is stored onto stack.
A Global variable made static can't be accessed from a
function outside the file using extern. So it limits the
scope.
Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
Explain how a pointer to function can be declared in C++?
List the types of polymorphism in c++?
What is an inline function in c++?
What is rtti in c++?
Explain "const" reference arguments in function?
Explain explicit container.
Is python written in c or c++?
Is vector a class in c++?
Explain Memory Allocation in C/C++ ?
Which software is used to run c++ program?
Which is better c++ or java?
What is a tree in c++?
Do inline functions improve performance?
What is the use of typedef?
What is difference between class and function?