basic data type which can be instanciated and used with the predefined operations of a programming language, or assembled as a building block together with other instances of any type to create more complex composite data types
In computer science, primitive data types are sets of basic data types from which all other data types are constructed. Specifically it often refers to the limited set of data representations in … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › Primitive_data_type
Primitive data type - Wikipedia
2 weeks ago - Other languages such as JavaScript, Python, Ruby, and many dialects of BASIC do not have a primitive character type but instead add strings as a primitive data type, typically using the UTF-8 encoding. Strings with a length of one are normally used to represent single characters. Some languages have character types that are too small to represent all Unicode characters. These are more properly categorized as integer types that have been given a misleading name. For example C includes a char type, but it is defined to be the smallest addressable unit of memory, which several standards (such as POSIX) require to be 8 bits.
🌐
GNU
gnu.org › software › c-intro-and-ref › manual › html_node › Primitive-Types.html
Primitive Types (GNU C Language Manual)
Next: Constants, Previous: Order of Execution, Up: GNU C Manual [Contents][Index] This chapter describes all the primitive data types of C—that is, all the data types that aren’t built up from other types.
🌐
C Language Basics
clanguagebasics.com › home › c language tutorial › data types in c: primitive data types in c language
Data Types in C: Primitive Data Types in C Language - C Language Basics
December 25, 2018 - Data types in C programming language ... in c language can be broadly classified as: Primitive Data Types User Defined Data Types, for example, enum, structure, union Derived Data Types, for example, array, […]...
🌐
Decodejava
decodejava.com › data-types-in-c.htm
C- Primitive Data Types - Decodejava.com
Well, when you store a character value using char data type, what gets stored is not the character but the binary equivalent of ASCII value of the character. For example : char c= 'A'; This code stores the binary equivalent of ASCII value of A i.e. 65 in the system.
🌐
Codecademy
codecademy.com › docs › data types
C | Data Types | Codecademy
May 15, 2024 - An integer, for example, might take up 32 bits on one computer, or perhaps it might be stored in 64 bits on another. These data types are mostly numeric (integers, doubles, floating-point numbers, etc.) and can be used for arithmetic operations like subtraction and division. Values that use the void keyword (for no data) are also regarded as primitive ...
🌐
Manuelradovanovic
manuelradovanovic.com › 2025 › 02 › understanding-primitive-data-types-in-c.html
MANUEL RADOVANOVIĆ : Understanding Primitive Data Types in the C Programming Language
Here's an overview of the basic or primitive data types in C: Integers - Integer Types: int - Used for whole numbers (e.g. 5, -10, 42). The size depends on the system architecture (usually 4 bytes on 32-bit or 64-bit systems).
🌐
MakeUseOf
makeuseof.com › home › programming › primitive data types in c: a beginner's guide
Primitive Data Types in C: A Beginner's Guide
September 12, 2021 - Primitive types are data types that come as part of the programming language. Non-primitive types are those defined by the programmer. They are also called reference types. In this article, you'll learn the seven primitive types in C. If you need to store an integer value in a variable, you can declare it as one of the following three types: int, short, or long. ... The choice depends on how large you expect the integer value to be. For example, the int data type accepts four-byte values.
Top answer
1 of 3
10

The answer is no, and for 2 reasons.

  1. The notion of primitive types in Java exists by opposition to object types. This has no sense in C which is not an object language.
  2. C intends to be as efficient as possible on any architecture, from 16 or even 8 bits microcontrollers to 64 bits platforms. For that reason the int type is generally chosen as the natural type for the architecture provided it contains at least 16 bits. On the other hand, Jave targets maximum portability and fixes the size of all its types.

So even if the list on Wikipedia looks large, it is (unfortunately...) accurate.

2 of 3
4

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.

Find elsewhere
🌐
Codeforwin
codeforwin.org › home › data types in c programming
Data types in C programming - Codeforwin
July 20, 2025 - For example: int is a data type used to define integer type variables. int a; here a is an integer type variable. It can store numbers from -2,147,483,648 to +2,147,483,647. Data types in C is classified in three broad categories. ... Read more – List of all primitive and derived data types in C.
🌐
Quora
computerscience.quora.com › What-are-the-primitive-data-types-in-C
What are the primitive data types in C? - Computer science - Quora
Thus, all C compilers provide support for these data types. There are about seven primitive data types in C. These data types are : short, int, long, char, float, double and a few of t...
🌐
GeeksforGeeks
geeksforgeeks.org › c language › data-types-in-c
Data Types in C - GeeksforGeeks
Note: The long, short, signed and unsigned are datatype modifier that can be used with some primitive data types to change the size or length of the datatype.
Published   October 18, 2025
🌐
Carnegie Mellon University
cs.cmu.edu › ~mrmiller › 15-110 › Handouts › primitiveData.pdf pdf
Primitive Data Types 15-110 Summer 2010 Margaret Reid-Miller
byte, short, int, long, float, double, char, boolean · • Primitive data are only single values; they · have no special capabilities. Summer 2010 · 15-110 (Reid-Miller) 4 · Common Primitive Types · Type · Description · Example of Literals · int · integers (whole ·
🌐
Kotlin
kotlinlang.org › docs › mapping-primitive-data-types-from-c.html
Mapping primitive data types from C – tutorial | Kotlin Documentation
Kotlin/Native can use the Gradle build system through the Kotlin Multiplatform plugin. The C programming language has the following data types: Basic types: char, int, float, double with modifiers signed, unsigned, short, long
Top answer
1 of 3
3

It really depends on how you count the data types. This web site lists these 7:

  • bool
  • char
  • int
  • float
  • double
  • void
  • wchar_t

However, these types can be modified with signed, unsigned, short, long. The site that you mentioned lists all of these, plus the new ones like char16_t and char32_t. I think that the 28 listed is a very comprehensive list, and I can't think of any that have been omitted (they've even covered unsigned long long int).

So, 28 looks right to me. The reason other sites my have different numbers is because they don't include the new ones, or they don't count all of the modifiers. Other sites may consider unsigned short int different from short unsigned int, but the two are equivalent.

2 of 3
2

"Primitive data type" is not a term that the standard specifies, so you might get a different answer depending on who you ask. Clang defines the following types as "built-in", meaning that they aren't derived from any other type:

  • void
  • bool
  • std::nullptr_t
  • float
  • double
  • long double
  • char16_t
  • char32_t
  • signed and unsigned variants of:
    • char
    • wchar_t
    • short
    • int
    • long
    • long long

The list contains more, but I believe that those are the only ones that are specified in standard C++.

The standard has essentially the same thing in [basic.fundamental] (calling these "fundamental types"), but the list isn't as convenient to navigate.

That would be a total of 20 primitive types (ignoring that char and wchar_t are treated separately from their explicitly signed/unsigned variants, because their default signedness is platform-dependent).

The standard also allows implementations to have "extended" signed and unsigned integer types. For instance, Clang supports a signed and unsigned __int128_t, which would fall in that category, but it isn't required by the standard.

🌐
Devlane
devlane.com › blog › what-are-primitive-data-types
What are Primitive Data Types?: Complete Guide with Examples / Devlane – Scale Your Team With Senior Nearshore Tech Talent
January 26, 2026 - Primitive types can vary depending on the programming language. Here are a few that are commonly found: Integers represent whole numbers with no fractional or decimal parts. They can be further classified according to their size, such as int (whole),long (long integer),short (short integer), or byte (8-bit integer). The byte is the smallest data type among all integer data types.
🌐
BYJUS
byjus.com › gate › data-types-in-c
Data Types in C
February 16, 2024 - For instance, the long int, short int, unsigned int, signed int, etc., are all very valid data types in the C programming language. Now, if we combine all the modifiers mentioned above with the five primitive or primary data types, then it will result in the formation of the following data types:
🌐
Javatpoint
javatpoint.com › primitive-data-type
Primitive Data Type (Data Structures) - javatpoint
Primitive Data Type with Introduction, Asymptotic Analysis, Array, Pointer, Structure, Singly Linked List, Doubly Linked List, Graph, Tree, B Tree, B+ Tree, Avl Tree etc.
🌐
Unstop
unstop.com › home › blog › guide to data types in c (with detailed examples)
Guide To Data Types In C (With Detailed Examples)
May 31, 2023 - There are 4 different types of ... integer data type (int), character data type, i.e., character or small integer value (char), floating-point data type, i.e., containing fractional part (float), and double data type (double), which is the ...
🌐
Centron
centron.de › startseite › understanding data types in c: a comprehensive guide
Data Types in C: Understanding Primitive and Derived Types
February 7, 2025 - Every character also has a corresponding ASCII value; for example, ‘A’ has an ASCII value of 65, while ‘1’ has an ASCII value of 49. ... The float type stores real numbers with precision up to 6 decimal places. It requires 4 bytes of memory. This data type is useful for storing values such as 3.14159 (π).