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
Why cout is used in c++?
What are the advantages of early binding?
How many characters are recognized by ANSI C++?
What is a v-table?
What is c++ similar to?
What is the difference between the parameter to a template and the parameter to a function?
How can a called function determine the number of arguments that have been passed to it?
Explain the difference between class and struct in c++?
What is name hiding in c++?
Can you overload the operator+ for short integers?
Define a pointer to a data member of the type pointer to pointer?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Is swift faster than go?
What programming language should I learn first?
What are the 4 types of library?