C appears to have many, many types, but what if any are considered primitive types.
The Java term "primitive type" distinguishes from reference types. C has no direct analog of Java's reference types, so no need to draw such a distinction.
C does, however, define several categories of types, and among those, the basic types are a reasonably good analogue of Java's primitive types. This category comprises char
, the signed and unsigned integer types, and the floating[-point] types. It is ultimately from these, the enumerated types, and type void
that all other types are derived, including array types, structure and union types, pointer types, atomic types, and function types.
The basic types can include implementation-defined types, and therefore cannot be exhaustively listed, but those defined by the language spec are:
char
The standard signed integer types
signed char
, short int
, int
, long int
, long long int
The standard unsigned integer types
_Bool
, unsigned char
, unsigned short int
, unsigned int
, unsigned long int
, unsigned long long int
The real floating types
float
, double
, long double
The complex types
float _Complex
, double _Complex
, long double _Complex
This is covered in section 6.2.5 of the language spec.
It should be noted that whereas Java specifies the the size and representation of its primitive types, C leaves some of those details of its basic types to implementations, placing constraints on their ranges of representable values and other properties without specifying exact details.
C appears to have many, many types
C has an unbounded number of types, as it provides for types to be derived from other types. The same applies to Java. Ignoring implementation-defined extension types, C has more than twice as many basic types as Java has primitive types, but that's still manageable, especially given the way they are organized.
However, C also has a mechanism for defining type aliases, and a whole family of standard type aliases, and these can make it appear that there are more types than really there are.