A perspective correcting guide.
Okay, so say you have gone a step further into this coding interest, you enrolled somewhere, someway, and I bet you one of the first straight-up, hands-on coding concepts was the mighty variable.
“A variable, in the context of programming, is a symbolic name given to an unknown quantity that permits the name to be used independently of the information it represents. Variables are associated with data storage locations, and values of a variable are normally changed during program execution.” As defined by Technopedia.
A variable is a storage container of some data of a specific type in the memory, each variable is uniquely named by the user. The range of data types varies a little, depending on the programming language. Each variable uses up a specific amount of data depending on the range of storage for the chosen type. A variable is one of a code’s most fundamental elements, no code is free from variables.
There are so many aspects to variables that are coding language dependant, like the types, the naming conventions, and the way a variable is accessed.
How a variable is stored in the memory is that every variable will be allocated a chunk of memory in the RAM, this chunk includes the data allocated to the variable, the variable’s name, and data type. This data will be allocated to a specific address like an identifier to help access the data in the future, as shown in Figure1.
How these variables are accessed is syntax-dependent. But upon execution of the program, the compiler accesses and manipulates the data using the variable’s address in the memory.
So variables are one of the most fundamental topics to learn in-depth with coding. They still have so much about them to learn of. Variables are highly dependent on the programming language of choice and have varying types. But learning about them is highly insightful.