In C programming, data types are used to define variables. Here are the primitive data types in C along with their memory size, format specifier, and range:1. **char**: - Memory Size: 1 byte - Format Specifier: %c - Range: -128 to 127 or 0 to 255 (if unsigned)2. **int**: - Memory Size: 2 or 4 bytes (depends on the system architecture) - Format Specifier: %d or %i - Range: -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 (if using 2 bytes or 4 bytes respectively), or 0 to 65,535 or 0 to 4,294,967,295 (if unsigned)3. **float**: - Memory Size: 4 bytes - Format Specifier: %f - Range: 1.2E-38 to 3.4E+38 (6 decimal places precision)4. **double**: - Memory Size: 8 bytes - Format Specifier: %lf - Range: 2.3E-308 to 1.7E+308 (15 decimal places precision)5. **short**: - Memory Size: 2 bytes - Format Specifier: %hd - Range: -32,768 to 32,767 (if signed) or 0 to 65,535 (if unsigned)6. **long**: - Memory Size: 4 or 8 bytes (depends on the system architecture) - Format Specifier: %ld - Range: -2,147,483,648 to 2,147,483,647 or -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (if using 4 bytes or 8 bytes respectively), or 0 to 4,294,967,295 or 0 to 18,446,744,073,709,551,615 (if unsigned)These are the commonly used primitive data types in C. The actual memory size and range may vary depending on the compiler and system architecture. Answer from skramani2000 on brainly.in
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › csharp › language-reference › builtin-types › built-in-types
Built-in types - C# reference | Microsoft Learn
January 20, 2026 - You use it as the return type of a method that doesn't return a value. The C# language includes specialized rules for the System.Span<T> and System.ReadOnlySpan<T> types. These types aren't classified as built-in types, because there aren't C# keywords that correspond to these types.
🌐
Code with C
codewithc.com › code with c › data science › understanding primitive data types in programming
Understanding Primitive Data Types In Programming - Code With C
February 21, 2024 - Programming, a world filled with buzzwords and jargons that sometimes makes my head spin faster than my morning coffee! Today, let’s unravel one of these mysterious terms – Primitive Data Types. 🤓 · So, what on earth are these “Primitive Data Types”? Well, imagine them as the building blocks of programming languages, the alphabet soup of ones and zeros! These bad boys are the simplest data types offered by a programming language. They form the skeleton on which fancier data structures are built upon. 💻 · In layman’s terms, primitive data types are the basic data types that are supported natively by a programming language.
Discussions

java - Does C have a concept of primitive types and if so what are they? - Stack Overflow
On the other hand, Jave targets ... all its types. So even if the list on Wikipedia looks large, it is (unfortunately...) accurate. ... Sign up to request clarification or add additional context in comments. ... Aren't char, long, double, etc...considered to be primitive data ... More on stackoverflow.com
🌐 stackoverflow.com
What is meant by a primitive data type? - Software Engineering Stack Exchange
So different languages have different sets of datatypes which are considered primitive for that particular language. Is that right? And what is the difference between a "basic datatype" and "built-in datatype". Wikipedia says a primitive datatype is either of the two. PS - Why is "string" type ... More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
March 14, 2012
Why do data types like "char" , "int" or "long" are called primitive, when they are all made up of binary? Technically, isn't all non-binary data "non primitive / composite"?
you're right that it is all binary eventually. Data types are are primitive usually fit into a number of categories. A primitive data type comes with the language and is idiomatic for the language. A primitive data type should be able to be expressed in the language using a limited amount of memory. A primitive data type has no additional methods attached to it (usually) The primitive data types are basically just data types that have been defined over the decade and they are considered so fundamental to programming and expressions in general with a language that nearly every language comes with a set of primitives you can use. Additionally, these primitives are fundamental and well documented to such a severity that there is a standardized way to handle them in memory. For example, characters and strings are typically handled with the ASCII way: https://erg.abdn.ac.uk/users/gorry/eg2069/ascii.html However, the whole point of programming is we want to make NEW things. We can easily define new data types. Infact whenever you define anything in any programming language you are de-facto making a new data type. For example class car = { doors = 4; color = "red"; wheels = 4; } When you define a new class, or even a new fuction. You're literally saying there is a new data type "car" and it has these properties and has these methods. These properties and methods is how it interacts with the rest of the language. any new data type typically is defined with primitives to keep track of it's properties and sometimes it's properties can even be other classes you've defined like this: class door { windows = 2; automatic_windows = true; } class car = { doors = [new door(), new door(), new door(), new door()]; color = "red"; wheels = 4; } These are new data types which we are creating, and languages that require typing syntax typically AUTOMATICALLY assume your classes are also types. So that's the easiest way to distinquish primitives from non-primitives. The primitives are already in the language when you kick up a new environment. Most primitives also are highly optimized and therefore are very performant. As you could imagine, a class/data type we define ourselves could be fairly bloated and significantly less performant than something as performant as an integer. It's important to note that there is a distinction between a class and a data type. These two things are not the same thing, but every class is ALSO a data type in addition to it's other capabilities. More on reddit.com
🌐 r/learnprogramming
12
1
May 4, 2022
Primitive vs User Defined vs Abstract Data Type, what's the delta?
Primative are things like char, int, pointers, floats,etc... built into the language. Effecively, anything other than enums, structs, or unions. Theses types are the user defined ones. C has no real support for abstract types. It means that operations are implemented without really being concerned with the type. C++ on the other hand lives and breathes the concept. More on reddit.com
🌐 r/C_Programming
2
6
March 28, 2023
🌐
R4r
r4r.co.in › c › basic_tutorials › 05 › primitive_data_types.shtml
C tutorial on Primitive Data Types
CSS tutorial · ASP.net · WCF tutorial · WPF tutorial · Struts tutorial · Spring · Hibernate · Android · Unix tutorial · Linux tutorial · SQL tutorial · WEB technology · Hot Topics · Database & SQL · HR FAQs · Interview & FAQs · ASK Questions ·
🌐
Scribd
scribd.com › presentation › 919965377 › Primitive-Data-Types-in-C
Primitive Data Types in C | PDF
Please check your connection, disable any ad blockers, or try using a different browser.
🌐
KoderHQ
koderhq.com › tutorial › c › data-types
C Data Types Tutorial | KoderHQ
The primitive long type is an integer type that allows us to store whole numbers between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 (-9.2 quintillion to 9.2 quintillion). ... If we store a value beyond the range of a long, int overflow could occur which may cause unexpected results. The void type is the absence of a type, it means “no type”. In C we cannot create data containers like variables with a void type.
🌐
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 - 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.
🌐
Scaler
scaler.com › topics › primitive-data-structure
Primitive Data Structure - Scaler Topics
July 1, 2022 - The primitive data structure will always store some data. It cannot contain the NULL value. Examples of the primitive data type are integer, character, boolean, float, double, long, etc.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › c language › data-types-in-c
Data Types in C - GeeksforGeeks
Different data types also have different ranges up to which can vary from compiler to compiler. If you want to know more about ranges refer to this Ranges of Datatypes in C. Note: The long, short, signed and unsigned are datatype modifier that can be used with some primitive data types to change ...
Published   October 18, 2025
🌐
Wikipedia
en.wikipedia.org › wiki › C_data_types
C data types - Wikipedia
3 weeks ago - The relation requirements are that the long long is not smaller than long, which is not smaller than int, which is not smaller than short. As char's size is always the minimum supported data type, no other data types (except bit-fields) can be smaller.
🌐
W3Schools
w3schools.com › c › c_data_types.php
C Data Types
As explained in the Variables chapter, a variable in C must be a specified data type, and you must use a format specifier inside the printf() function to display it:
🌐
TutorialsPoint
tutorialspoint.com › home › cprogramming › c data types
C Data Types
June 10, 2012 - C - Pointers vs. Multi-dimensional Arrays ... Data types in C refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.
🌐
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 ...
🌐
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.
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.

🌐
Programiz
programiz.com › c-programming › c-data-types
C Data Types
Data types are declarations for variables. This determines the type and size of data associated with variables. In this tutorial, you will learn about basic data types such as int, float, char, etc. in C programming.
🌐
Codecademy
codecademy.com › docs › data types
C | Data Types | Codecademy
May 15, 2024 - 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 data types.
🌐
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 - When using a Primitive type, a specific amount of memory is reserved to store the corresponding value. Each primitive type has a default size in bytes, determining the memory required to store its value. This memory is directly allocated and can be efficiently accessed to read and modify stored data.
Top answer
1 of 8
33

It kind of depends on the language.

For example, in languages like C and C++, you have a number of built-in scalar types - int, float, double, char, etc. These are "primitive" in the sense that they cannot be decomposed into simpler components. From these basic types you can define new types - pointer types, array types, struct types, union types, etc.

Then you have a language like old-school Lisp, where everything is either an atom or a list. Again, by the above definition, an atom is "primitive" in the sense that it cannot be decomposed into something simpler.

Edit

As far as I'm concerned, the terms "primitive", "basic", and "built-in" are pretty much interchangeable. If you want to get really pedantic, though, you can distinguish between types that are "built-in" (those explicitly provided by the language definition) and types derived from the built-in types that are still "primitive" or "basic" in that they cannot be decomposed into simpler elements. C's typedef facility allows you to create new type names for existing types. Ada allows you to create new scalar types that have constraints on them. For example, you can derive a Latitude type from the built-in floating type, with the constraint that it can't take on values outside the range [-90.0, 90.0]. It's still a primitive or basic type in that it cannot be broken down into any simpler components, but since it's user-defined, it's not considered a "built-in" type.

Again, these concepts are a little fuzzy, and it really depends on context. For example, the notion of a "built-in" type is meaningless for a typeless language like BLISS.

2 of 8
20

From the Java perspective:

In Java, there is a very clear distinction between primitive and non-primitive types.

A variable of a primitive type directly contains the value of that type (in other words, they are value types).

A variable of a non-primitive type doesn't contain the value directly; instead, it is a reference (similar to a pointer) to an object. (It is not possible in Java to create user-defined value types).

Java has eight primitive types: byte, short, int, long, char, boolean, float and double. Anything else is a non-primitive type.

🌐
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 enables the programmers to appropriately select the data as per requirements of the program and the associated operations of handling it. Data types 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, […]