The standard defines array type meticulously, but I don't see any definition for array.
We might say "object of array type", however that can't be right as untyped objects (e.g. space allocated by malloc
) is described as an array.
Motivation: The specification for %s
in fprintf
(C11 7.21.6.1/8) says:
the argument shall be a pointer to the initial element of an array of character type
but take the code char s[] = "hello"; printf("%s", s+1);
then we passed a pointer to the second element. That definition appears to be assuming that array means any set of contiguous object(s).
Edit: seeing as I have picked up some "unclear what you're asking" votes, my question is: What is that definition of the term array as used by ISO/IEC 9899:2011 ?