What is stack and heap?

Answer Posted / pushparaj pentakota(anakapalli

stack can store value type and reference type also but at compile time only but heap can store objects at run-time.stack can't store objects bcz stack at run-time can't increse their memory size it's fixed length.objects need extra memory sometimes so objects allocate memory in heap context.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a jagged array?

488


Why are mutable structs evil?

539


What does console mean c#?

495


What to implement on my class Finalize or IDisposable

552


Which program construct must return a value?

565






Is overriding of a function possible in the same class?

467


Describe ado.net?

572


What do you mean by saying a "struct is a value type"?

517


Are arrays value types or reference types?

530


What is satellite assembly? And steps to create satellite assembly?

512


What does assert() do in c#?

547


Are all methods virtual in c#?

534


Is c# code is managed or unmanaged code?

487


What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?

509


Define Final Class in C#

542