12. What is unsized array ?
Answers
Answered by
1
Answer:
If unsized arrays are declared, the C compiler automatically creates an array big enough to hold all the initializers. This is called an unsized array.
Answered by
0
Answer:
Array initialization without size means that the size of the array is skipped in the initialization statement. C++ then automatically creates an array large enough to hold any initializers present and calculates the dimensions of the array without size.
- You can use unsized arrays to automatically size arrays in C++.
- If the size of the array is not specified in the array initializer statement, C++ automatically creates an array large enough to hold all the initializers present.
- A sizeless array initialization method allows you to change the message without changing the size of the array.
- This avoids errors caused by miscounting the number of characters in the message.
- Sizeless array initializers are not limited to one-dimensional arrays.
- For multidimensional arrays, all but the leftmost dimension must be specified for C++ to index the array properly.
- A sizeless array initializer allows you to create tables of varying lengths and the compiler automatically allocates enough space for the table.
- The advantage of this declaration over the customized version is that the table can be made longer or shorter without changing the dimensions of the array.
Read here more-
What is an array? What is a one-dimensional array?
https://brainly.in/question/98722
What do you understand by an array? What is the significance of arrays?
https://brainly.in/question/12768672
#SPJ5
Similar questions