Skip to main content

Posts

Featured

Why do I prefer "Stack" than "Heap" in coding?

I. The beginning Figure 1.0 As a student who just start to learn how the computer runs after we write those lines of code, I recently know the definition of " Stack" and "Heap" in memory process. At that time, I was quite confused about which one I would choose then after searching and learning on the internet, I finally got my answer that I would pick "Stack" rather than "Heap". The reasons are bellow here.  II. The middle At the first start, let's get to know what is "Stack" and "Heap" meaning? And why we have to know them? 1. The definition What is "Stack" and "Heap" meaning? So basically, coding is just placing instructions (operators like +,-,.. or for, while,...) from one register to another one. So the first task we have to do is initializing variables and there are two ways to do this which are "Stack" and "Heap". Now we know that the basic working of  "Stack" and &

Latest Posts