what is the difference between heap and stack

Answer:The main difference b/n the Heap and the Stack are given below:

1.In stack we create object temporary where programmer used to reserve allocation.'
2.stack not have automatic garbage collection where as heap have automatic garbage collection.

No comments:

Post a Comment

comment on this post

Note: Only a member of this blog may post a comment.