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 we change the basic meaning of an operator in c++?
What are the vectors in c++?
What is #include iostream?
Differentiate between realloc() and free().
Define what is constructor?
What is ifstream c++?
How many characters are recognized by ANSI C++?
How can you specify a class in C++?
Explain one method to process an entire string as one unit?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
Where must the declaration of a friend function appear?
What is else if syntax?
Explain differences between alloc() and free()?
What is a tuple c++?
Is c++ primer good for beginners?