data type supported by the C programming language
In the C programming language, data types constitute the semantics and characteristics of storage of data elements. They are expressed in the language syntax in form of declarations for memory locations or … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › C_data_types
C data types - Wikipedia
October 2, 2026 - The C language provides the four ... and double (as well as the Boolean type bool), and the modifiers signed, unsigned, short, and long. The following table lists the permissible combinations in specifying a large set of storage size-specific declarations. ↑ The standard term for the size of an integer type in bits is width. The width does not include padding bits. 1 2 3 4 5 The minimal ranges [−(2n−1−1), ...
🌐
DaniWeb
daniweb.com › programming › software-development › threads › 75943 › range-of-a-double-integer-in-c
Range of a double integer in C++ | DaniWeb
April 20, 2007 - What actually I want to do with the program is, get an output in double data type not double integer. As I mentioned earlier the double data type can store any value with a between the acceptable range of 2.2e-308 to 1.8e308.
People also ask

What differentiates the range for unsigned and signed types?
Although the size of any unsigned as well as the signed data type is all the same, they both possess different ranges of values to be stored in any variable. Why? It is because the representation of the signed numbers is in 2’s complement form in any processor or machine. For instance, the representation of the number -23 in the form of 2’s complement would be: (Decimal) 23 <-> (Binary) 10111
🌐
byjus.com
byjus.com › gate › size-of-data-types-in-c
Size of Data Types in C
Why do we use the floating data types?
The C language specifies two of the primary data types for storing the fractional numbers or the floating-point. These are double or float. One can easily apply the long qualifiers on the double. Thus, we get another type, which is the long double. · In a computer system, the IEEE-754 format represents the floating-point numbers. A majority of modern processors and processors adopt this format. It has two major representations: · 1. 32-bit single precision · 2. 64-bit double precision
🌐
byjus.com
byjus.com › gate › size-of-data-types-in-c
Size of Data Types in C
🌐
W3Resource
w3resource.com › c-programming › c-data-types.php
C Data Types - w3resource
April 8, 2026 - Ranges for integer data types in ...----------------------------------------- flaot 1.175494e-38 3.402823e+38 double 2.225074e-308 1.797693e+308 long double 3.362103e-4932 1.189731e+4932...
🌐
TutorialsPoint
tutorialspoint.com › cprogramming › c_data_types.htm
C - Data Types
The type of a function specifies the type of the function's return value. We will see the basic types in the following section, where as other types will be covered in the upcoming chapters. The following table provides the details of standard integer types with their storage sizes and value ranges −
🌐
GeeksforGeeks
geeksforgeeks.org › c language › ranges-of-data-types-in-c
Ranges of Data Types in C - GeeksforGeeks
January 24, 2026 - The ranges of data types in C define ... For example, int typically ranges from -2,147,483,648 to 2,147,483,647 for signed, and 0 to 4,294,967,295 for unsigned on a 32-bit system....
🌐
GeeksforGeeks
geeksforgeeks.org › c++ › data-type-ranges-and-their-macros-in-c
Data Type Ranges and Their Macros in C++ - GeeksforGeeks
June 13, 2026 - Integer type limits are defined in the <climits> header. Floating-point type limits are defined in the <cfloat> header. These macros help avoid hardcoding implementation-specific values. Example: The following program displays the ranges of several built-in data types using predefined macros ... #include <iostream> // for int, char macros #include <climits> // for float, double ...
🌐
Javatpoint
javatpoint.com › range-of-int-in-c
Range of Int in C - javatpoint
In this topic, we will discuss the abs function in the C programming language. The abs () function is a predefined function in the stdlib.h header file to return the absolute value of the given integers.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › c language › data-types-in-c
Data Types in C - GeeksforGeeks
We use int keyword to declare the integer variable: Size: typically 4 bytes, Range: -2,147,483,648 to 2,147,483,647. Format specifier: %d. Format specifiers are the symbols that are used for printing and scanning values of given data types.
Published: 1 month ago
🌐
BYJUS
byjus.com › gate › size-of-data-types-in-c
Size of Data Types in C
February 16, 2024 - The char data type can hold a single character in a local character set. float – these are single-precision types of floating-point. int – these are integers. They typically reflect the integer’s natural size on a host machine. double – these are double-precision types of floating-point. Apart from this, one can also apply various numbers of qualifiers to the basic data types. The long and short qualifiers applied to integers would turn out to be: ... The data type size and range depend a lot on the compiler.
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › cpp › data-type-ranges
Data Type Ranges | Microsoft Learn
C/C++ in Visual Studio also supports sized integer types. For more information, see __int8, __int16, __int32, __int64 and Integer Limits. For more information about the restrictions of the sizes of each type, see Built-in types. The range of enumerated types varies depending on the language context and specified compiler flags.
🌐
Javatpoint
javatpoint.com › what-is-double-in-c
What is double in C - javatpoint
What is double in C with Tutorial, C language with programming examples for beginners and professionals covering concepts, c pointers, c structures, c union, c strings etc.
🌐
YouTube
youtube.com › watch
Displaying Float, Double, and Long Double Value Ranges in C Programming - YouTube
In this C Programming Language tutorial, we dive into understanding the range of values that can be represented by different floating-point types: float, dou...
Published: April 7, 2025
🌐
Northern Michigan University
nmu.edu › Webb › ArchivedHTML › MathComputerScience › c_programming › c_009.htm
Different Types of Integers
They can be signed (default) or unsigned, which means they have a range of -32768 to 32767 and 0 to 65535, respectively. Type modifiers: signed, unsigned, short, long A type modifier alters the meaning of the base type to yield a new type. Each of the above can be applied to the base type int.
🌐
Codeforwin
codeforwin.org › home › how to find range of data types in c programming?
How to find range of data types in C programming? - Codeforwin
July 20, 2025 - Range of signed char -128 to 127 ... 18446744073709551615 Range of float 1.175494e-038 to 3.402823e+038 Range of double 2.225074e-308 to 1.797693e+308 Range of long double -0.000000e+000 to -1.#QNAN0e+000 ......
🌐
freeCodeCamp
freecodecamp.org › news › data-types-in-c-integer-floating-point-and-void-explained
Data Types in C - Integer, Floating Point, and Void Explained
February 1, 2020 - It’s capable of storing at least −9,223,372,036,854,775,807 to 9,223,372,036,854,775,807. Alternatively, get even more overkill with unsigned long long, which will give you at least 0 to 18,446,744,073,709,551,615. float takes at least 32 ...
🌐
W3Schools
w3schools.com › c › c_data_types.php
C Data Types
Every variable in C has a data type, such as int, float, char, or double, with a matching format specifier.
🌐
Testbook
testbook.com › home › gate › double data type in c - detailed guide | testbook
Double Data Type in C - Detailed Guide | Testbook
The double data type is a precision data type that can hold 64 bits of decimal numbers or floating points. It can store exactly double the size of data as compared to the float data type.
Top answer
1 of 11
163

The minimum ranges you can rely on are:

  • short int and int: -32,767 to 32,767
  • unsigned short int and unsigned int: 0 to 65,535
  • long int: -2,147,483,647 to 2,147,483,647
  • unsigned long int: 0 to 4,294,967,295

This means that no, long int cannot be relied upon to store any 10-digit number. However, a larger type, long long int, was introduced to C in C99 and C++ in C++11 (this type is also often supported as an extension by compilers built for older standards that did not include it). The minimum range for this type, if your compiler supports it, is:

  • long long int: -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807
  • unsigned long long int: 0 to 18,446,744,073,709,551,615

So that type will be big enough (again, if you have it available).


A note for those who believe I've made a mistake with these lower bounds: the C requirements for the ranges are written to allow for ones' complement or sign-magnitude integer representations, where the lowest representable value and the highest representable value differ only in sign. It is also allowed to have a two's complement representation where the value with sign bit 1 and all value bits 0 is a trap representation rather than a legal value. In other words, int is not required to be able to represent the value -32,768.

2 of 11
36

The size of the numerical types is not defined in the C++ standard, although the minimum sizes are. The way to tell what size they are on your platform is to use numeric limits

For example, the maximum value for a int can be found by:

std::numeric_limits<int>::max();

Computers don't work in base 10, which means that the maximum value will be in the form of 2n-1 because of how the numbers of represent in memory. Take for example eight bits (1 byte)

  0100 1000

The right most bit (number) when set to 1 represents 20, the next bit 21, then 22 and so on until we get to the left most bit which if the number is unsigned represents 27.

So the number represents 26 + 23 = 64 + 8 = 72, because the 4th bit from the right and the 7th bit right the left are set.

If we set all values to 1:

11111111

The number is now (assuming unsigned)
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 = 28 - 1
And as we can see, that is the largest possible value that can be represented with 8 bits.

On my machine and int and a long are the same, each able to hold between -231 to 231 - 1. In my experience the most common size on modern 32 bit desktop machine.