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
What is the use of "new" operator?
Explain data encapsulation?
What are the basic data types used in c++?
What is a syntax in c++?
Where the memory to the static variables is allocated?
What is the basic concept of c++?
Difference between a homogeneous and a heterogeneous container
Which compiler does turbo c++ use?
Explain what are single and multiple inheritances in c++?
Is c++ slower than c?
How do you clear a buffer in c++?
Explain the difference between new() and malloc() in c++?
Explain linear search.
Write about the access privileges in c++ and also mention about its default access level?
If you don’t declare a return value, what type of return value is assumed?