1.

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

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. 


Discussion

No Comment Found

Related InterviewSolutions