IntelMCS-51. By Wikiwand.

Variables: A Generalized Summary

S.J.
An Idea (by Ingenious Piece)
2 min readMar 1, 2021

--

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 the course of 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.

The way in which 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.

Figure1: How Memory Works. By V/2-Knowledgebase2002.

The way in which 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 dependant on the programming language of choice and have varying types. But learning about them is highly insightful.

--

--

S.J.
An Idea (by Ingenious Piece)

Simplifying Computer Science and code to our absolute beginners!!! @SJcodes_