A variable could contain data values which are “fixed”, but usually variables are used to contain/point to values that are dynamic.

Some formal programming languages also defines variables as Global variables or Local variables.

When a programmer runs a script containing variable declarations, the variable names will reserves one or more addresses in the Random Access Memory (RAM) where a binary value can be stored.

RAM has two different locations (Heap and Stack) where variable declarations can affect.

  • Global variables usually go to the Heap.
  • Local variables usually go in the Stack.

If you carry on to diploma and university studies, there will usually be a few foundational modules to help you better understand the theory linkage between programming and the compute systems. The learning topics will usually be named as Object-Oriented Programming, Data Structures and Algorithm, Flow Controls etc.

References:

Leave a Reply

Your email address will not be published. Required fields are marked *