Computer Science, asked by bhageerath3334, 1 year ago

Difference between array and ordinary variable in c

Answers

Answered by Avanish010
17
hi there,

1.Array holds multiple values, whereas an ordinary variable hold a single value.

2 it is true when the elements of the array are treated as individual entities.

3.when the variable is a simple scalar variable such as an int. It is not generally right to distinguish between a variable and an array..

thank you
Answered by Anonymous
6

The difference between the array description and the ordinary variable is the, array is always declared, initialized, and accessed by subscription, whereas the ordinary variable has no subscription.

Other differences include -

  • Array is a set of multiple values where as at a time, the variable can store single value.
  • The syntax for ordinary variable definition is data_type v1, v2, whereas, Data type v1 (N1) ,v2 (N2), is the syntax for the array variable; where v1,v2 are the variable names and N1, N2 are the integer constants that indicate the maximum array size.
Similar questions