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
Is there a sort function in c++?
Is c++ a float?
Explain how to initialize a const data member.
Is c++ a high level language?
Is swift faster than go?
What do you mean by early binding?
What are the advantages of using a pointer?
Is there any function that can skip certain number of characters present in the input stream?
What is an associative container in c++?
What is the header file for setw?
Can member functions be private?
What is the use of bit fields in structure declaration?
What is function declaration in c++ with example?
What is the limitation of cin while taking input for character array?
How do you differentiate between overloading the prefix and postfix increments?