Compatibility of arrays

Two array types that are similarly qualified are compatible if the types of their elements are compatible. For example,

char ex1[25];
const char ex2[25];

are not compatible.

The composite type of two compatible array types is an array with the composite element type. The sizes of both original types must be equivalent if they are known. If the size of only one of the original array types is known, then the composite type has that size. For example:

char ex3[];
char ex4[42];

The composite type of ex3 and ex4 is char[42]. If one of the original types is a variable length array, the composite type is that type.

Related information