What is a Data Type in C

Data type is used to specify the type of data.

TypeData types
Basic Data Typeint, char, float, double
Derived Data Typearray, pointer, structure, union
Enumeration Data Typeenum
Void Data Typevoid

Basic Data Types

TypeStorage sizeValue range
char1 byte-128 to 127 or 0 to 255
unsigned char1 byte0 to 255
signed char1 byte-128 to 127
int2 bytes-32,768 to 32,767
unsigned int2 bytes0 to 65,535
short2 bytes-32,768 to 32,767
long4 bytes-2,147,483,648 to 2,147,483,647
unsigned long4 bytes0 to 4,294,967,295
float4 bytes1.2E-38 to 3.4E+38 (6 decimal places)
double8 bytes2.3E-308 to 1.7E+308 (15 decimal places)
Long double10 bytes3.4E-4932 to 1.1E+4932 (19 decimal places)

 

Recommended Videos

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
26 + 2 =