+2 votes
in Class 12 by kratos

What is meant by unsized array initialization in C++? What are its benefits?

1 Answer

+2 votes
by kratos
 
Best answer

Unsized array initialization means skip the size of the array I an initialization statement. The C++, then automatically creates an array big enough to hold all the initializers present and calculates the dimensions of unsized arrays.

Example: char S1 [ ] = “First String”;

Advantages:

  • Less tedious.
  • Allow to change any of the values without **** of using incorrect array dimensions.
  • We may lengthen or shorten the value-list without changing the array dimensions.
...