Generally variables are stored in heap memory. When he
variables are created in stack?
Answer Posted / vadivelt
It is wrong to say that genarally variables will be stored
in heap memmory.
Bcos Storage area always depends on the storage class of
the variable.
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 'extern' and 'static' in data
segment.
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 ? | 15 Yes | 0 No |
Post New Answer View All Answers
How the delete operator differs from the delete[]operator?
Can you use the function fprintf() to display the output on the screen?
What are the advantage of using register variables?
Differentiate between late binding and early binding. What are the advantages of early binding?
How to declare a pointer to an array of integers?
Why is c++ still used?
Why do we need c++?
What are static variables?
Why do we use classes in c++?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
Explain what is polymorphism in c++?
What is the best ide for c++?
What is the main purpose of c++?
Is it possible to get the source code back from binary file?