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 volatile variable?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Mention the storage classes in c++.
What do c++ programmers do?
What are c++ templates used for?
What is problem with overriding functions?
What are the new features that iso/ansi c++ has added to original c++ specifications?
What's the order in which the local objects are destructed?
What is endianness?
What is the difference between a pointer and a link in c ++?
What do you mean by translation unit in c++?
What is linked list in c++?
Describe protected access specifiers?
What is lambda in c++?
Can we use struct in c++?