What is the effect of not specifying the size of the array when initializing it with a list of values?

  • Compilation error
  • The array is initialized with a default size of 10
  • The array size is automatically set based on the number of values
  • Undefined behavior
When initializing an array with a list of values in C without specifying the size, the array size is automatically set based on the number of values. It is a convenient feature in C known as array initialization without a size specification.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *