"what happens to fields not named by a designated initializer?" Code Answer


they are zeroed. from the c99 standard ยง6.7.8 (initialization)/21,

if there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration.

By Pixxl on May 30 2022
Only authorized users can answer the Search term. Please sign in first, or register a free account.