difference between ordinary variable and subscript variable
Answers
Answer:
The difference between the definition of array and ordinary variable is the, array is always declared, initialized, and accessed using subscript whereas ordinary variable do not have any subscript.
The ordinary variable is said for the single variable whereas The subscript variable is said for array variable.
Explanation:
The ordinary variable is used to represent the single variable. This is used to assign some value and used that value in the execution of the program. After the end of the program, this variable has no existence in the memory. For example "int a=10" is a syntax to define the ordinary variable in c language in which a is an ordinary variable of integer type(which holds the integer value).
The subscript variable is used to represent the array variable. It is used to denote the combination of an ordinary variable. It can be used where an ordinary variable can be used. For example "int a[10]", is a syntax to declare a subscript variable in 'c' programming language which is used to represent 10 ordinary variables of integer type in which the first ordinary variable is a[0].
Learn More:
- Static variable refer to an external variable: https://brainly.in/question/5205644
- Normal variable and Array Variable: https://brainly.in/question/2598092