What is a difference between stack and heap memory?



What is a difference between stack and heap memory?..

Answer / Yachana Sharma

Stack and Heap are two types of memory used in programming. Stack is a sequential collection of blocks of memory, usually organized as a last-in-first-out (LIFO) data structure, used for storing local variables, function parameters, and return addresses. On the other hand, Heap is a large block of memory that is dynamically allocated and deallocated by the program during runtime, using functions such as malloc(), calloc(), and new. Stacks are managed automatically, while heap management requires manual control in non-ARC projects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

what is dispatchQueue?

1 Answers  


Difference between ScrollviewdidScroll and didendDecelerating delegates?

1 Answers  


Explain ~/documents, ~/library, ~/tmp. What directory is ~ on ios?

1 Answers  


What is dynamic in iOS operating system?

1 Answers   B-Ways TecnoSoft,


Difference between sax parser and dom parser ?

1 Answers  


What are design patterns in ios?

1 Answers  


How do you setup/initialise a core data stack in your application? Is this activity performed on main thread? If not, why?

1 Answers  


Why core data is faster than sqlite?

1 Answers  


Explain me does ios support multitasking?

1 Answers  


What is plist file and explain about it is usage in iOS operating system?

1 Answers   UGC Corporation,


Is it possible to write a program without using nib file

1 Answers  


What's the latest version of ios?

0 Answers  


Categories