+2 votes
in Class 12 by kratos

If an array is initialized at the time of declaration, what thing one must bear in mind?

1 Answer

+4 votes
by kratos
 
Best answer

The general form of array initialization is as shown below:

type array-name[size N] = {value-list};

If an array is initialized at the time of declaration, following thing one must bear in mind:

  • The element values in the value-list must have the same data type as that of type, the base type of the array.
  • In character array, you must make sure that the array you declare is long enough to include the null.
...