What is the definition of Incomplete Type and Object Type in C? Also, could you provide some examples of each?
ANSI C99 mentions both type categories in various places, though I’ve found it difficult to understand what each of them means exactly (there is no paragraph/sentence explicitly defining what they are).
Let’s go to the online C standard (draft n1256):
Examples of incomplete types:
You cannot create instances of incomplete types, but you can create pointers and typedef names from incomplete types:
To turn the incomplete struct type into an object type, we have to define the struct: