3 ms·
Maybe do not overthink it. 'x' is called a character literal, but it has the type int. `{'x', 'y', 'z', '\0'}` does not have a type by itself, but it's valid s
by kzrdude 4y ago
Maybe do not overthink it. 'x' is called a character literal, but it has the type int.
`{'x', 'y', 'z', '\0'}` does not have a type by itself, but it's valid syntax to use it to initialize various structs and arrays - some of those will have the size you are looking for, depending on which type of array or struct you choose to initialize with that: https://gcc.godbolt.org/z/Tqjq3xzKo https://gcc.godbolt.org/z/Tqjq3xzKo
- nequo 4y agoThank you for the explanation and the Godbolt example! I appreciate it. Apologies for fumbling around in confusion.