answersLogoWhite

0


Best Answer

ordanry variable store one value at a time.

arrays are used for storing more than one value at a time in a single variable name

ordanry variable doesnt have subscript.

array must have subscript

syntax for ord. variable Datatype v1,v2......

syntax for array variable Datatype v1[n1],v2[n2].....

User Avatar

Wilburn Stoltenberg

Lvl 10
2y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How array differ from ordinary variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between array element and variable?

• Array is the set of an multiple values where as variable can store single value at a time.• 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 syntax for ordinary variable definition is data_type v1, v2, ….;• And the syntax for array variable is data_type v1[N1],v2[N2],…; where v1,v2 are name of variable and N1, N2 are the integer constants indicating the maximum size of array.


How do arrays differ from single memory position variables?

A single memory position variable can store only one value of its type. An array can store n number of values, where n is the size of the array.


Passing an array name to a pointer assigns the first memory location of the array to the pointer variable?

Yes, passing an array name to a pointer assigns the first memory location of the array to the pointer variable. An array name is the same as a pointer to the first location of the array, with the exception that an array name is a r-value, while a pointer is an l-value.


If structure is arraythen an individual array element can be accessed by writing a variable?

A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.


How do you swap two adjecent no in array in c?

Option 1) Use a temporary variable: int x = array[i]; array[i] = array[i+1]; array[i+1] = x; Option 2) Use bit operators: array[i] ^= array[i+1] ^= array[i];

Related questions

What are the different logic gates?

1.) what is operating system? 2.) what an array ? how is an array different from ordinary variable ?


What is the difference between array element and variable?

• Array is the set of an multiple values where as variable can store single value at a time.• 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 syntax for ordinary variable definition is data_type v1, v2, ….;• And the syntax for array variable is data_type v1[N1],v2[N2],…; where v1,v2 are name of variable and N1, N2 are the integer constants indicating the maximum size of array.


How do arrays differ from single memory position variables?

A single memory position variable can store only one value of its type. An array can store n number of values, where n is the size of the array.


How does an array differ from a array?

'a array' is substandard, if you use it, you might be frowned upon.


What is ordinary variable?

Ordinary variable are those variables that can store only one (1) variables


Passing an array name to a pointer assigns the first memory location of the array to the pointer variable?

Yes, passing an array name to a pointer assigns the first memory location of the array to the pointer variable. An array name is the same as a pointer to the first location of the array, with the exception that an array name is a r-value, while a pointer is an l-value.


If structure is arraythen an individual array element can be accessed by writing a variable?

A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.


How do you swap two adjecent no in array in c?

Option 1) Use a temporary variable: int x = array[i]; array[i] = array[i+1]; array[i+1] = x; Option 2) Use bit operators: array[i] ^= array[i+1] ^= array[i];


Why array is differ from structure?

An array is an aggregate of the same type. A structure is an aggregate of different types.


What is the difference between an array shift and unsetting a variable in PHP?

By shifting the values in an array, you are moving a key's value to the previous key. The very first key's value is obliterated. By shifting all values in the array, all keys will have a value of NULL. Unsetting a variable is entirely different -- performing a variable unsetting causes the variable to have a value of NULL, as if it was never set.


Is there a way to use a variable to declare the size of an array in true basic?

! variable to declase the size of an array in True Basic ! set up a dummy value for array - any initial value > 0 is fine. DIM array$(999) ! ask the user for the length of the array INPUT PROMPT "Enter array size " :size ! resize the array with user defined length MAT REDIM array$(size) ! program end END


What is an individual storage location in an array?

swag variable