Generally variables are stored in heap memory. When he
variables are created in stack?
Answer Posted / suneet
According to the C standard the storage will be.
1.variable with storage class 'auto' ie., local to the
function - in stack memory.
2.variable with storage class when 'extern' and 'static' are initialized stored in data segment otherwise found in bss.
3.variable with storage class 'register' in processor
register. But this register variable will be treated as
auto when there is no enough memory in the processor.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
What is the most common mistake on c++ and oo projects?
Tell me what are static member functions?
Is std :: string immutable?
What is flag in computer?
Do the parentheses after the type name make a difference with new?
What is the role of C++ shorthand's?
Why is main an int?
What is the importance of mutable keyword?
What are move semantics?
What is runtime polymorphism in c++?
Differentiate between late binding and early binding.
What is the difference between the indirection operator and the address of oper-ator?
What is the difference between #define debug 0 and #undef debug?
Is swift a good first language?