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
What are advantages of using friend classes?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
Can malloc be used in c++?
What is meant by a delegate?
What is the use of typedef?
How will you call C functions from C ++ and vice-versa?
What is the purpose of extern storage specifier?
What are the implicit member functions of class?
What is the meaning of c++?
What is the best c++ ide?
What is c++ coding?
what is multi-threading in C++?
How come you find out if a linked-list is a cycle or not?
How do I tokenize a string in c++?
Explain polymorphism?