What is data storage? the terms data objects, variables, and constants concerning data storage?


In a computer, the data is stored in memory, registers, and external media.

Generally, all these devices have an approximately simple structure as a sequence of bits arranged into bytes or words. However, data storage of the virtual computer for a programming language influence to carry a more complex organization with arrays, stacks, numbers, character strings, and multiple forms of data existing at multiple points during the implementation of a program. It is acceptable to use the term data object defines the run-time arranging of one or more elements of data in a virtual computer.

Any data objects that continue during the program execution are programmer-defined such as variables, constants, arrays, files, etc. The programmer especially generates and manipulates through declaration and statements in the program.

  • Data Object − A data object defines a container for data values (a place where data values can be saved and fetched). A data object is represented by a set of attributes, the most essential of which is its data type. The attributes decide the number and type of values that the data object can include and also decide the logical system of those values.

  • Variables − A variable is a data object that is represented and named by the programmer especially in a program. A simple variable is an elementary data object with a name. The value of a variable as being modifiable by assignment operations (i.e., the binding of the data object to value can change during its lifetime). If there is no difference between upper and lowercase letters in a name such as MYVARIABLE or myvariable or Myvariable defines the equivalent object), the names are case insensitive.

  • Constants − A constant is a special kind of variable whose value cannot generally be modified by the program during its implementation. Even though a constant’s value is defined only once, a constant can be referenced several times in a program. Using a constant rather than defining a value several times in the program cannot only clarify code maintenance but is used to store a significant name for it and combine such constant bindings to a standard code area. For example, in C language const float pi = 3.1416.

A constant is a data object with a name that is bound to a value permanently during its lifetime. The constant can be integer, character, or float. A programmer-defined constant is a constant whose name is selected by the programmer in a description of the data object.

Updated on: 22-Oct-2021

449 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements