0% found this document useful (0 votes)
4 views

7-Data Types in C_ Derived and Modifiers

The document discusses primary data types in C, which are fundamental and include int, char, float, and double. It provides details on the memory size and range for each data type. The memory sizes are 4 bytes for int and float, 1 byte for char, and 8 bytes for double.

Uploaded by

shubhrajkumar707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

7-Data Types in C_ Derived and Modifiers

The document discusses primary data types in C, which are fundamental and include int, char, float, and double. It provides details on the memory size and range for each data type. The memory sizes are 4 bytes for int and float, 1 byte for char, and 8 bytes for double.

Uploaded by

shubhrajkumar707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Various Data Types

Primary Data Types in C

Primary data types are also known as the fundamental data types because they are pre-defined or they already exist in the C language. All the
other types of data types (derived and user-defined data types) are derived from these data types. Primary data types in C are of 4 types: int,
char, float, and double. In this section, we are going to discuss all these data types in detail.

The following table represents the memory consumed or size of each primary data types in C:

DATA FORMAT
MEMORY (bytes) RANGE
TYPE SPECIFIER

-231 to 231 -
int 4 %d
1

char 1 -128 to 127 %c

1.2E-38 to
float 4 %f
3.4E+38

2.3E-308 to
double 8 %lf
1.7E+308

You might also like