Data Type

Data Type


The type, or data type, or a variable determines a set of values that a variable might take and a set of operations that can be applied to those values. Data types can be broadly classified as shown in Figure

Classification of data types

C language supports 2 different type of data types:

•Primary data types:
These are fundamental data types in C namely integer(int), floating point(float), character(char) and void.
                      •Derived data types:
Derived data types are nothing but primary datatypes but a little twisted or grouped together like arraystuctureunion and pointer. These are discussed in details later.


C  provides a standard, minimal set of basic 
data types. Sometimes these are called ‘primitive’ types. More complex data types can be built up from these basic types. C has five basic data types and they are as follows:


- character—Keyword used is char
- Integer—Keyword used is int
- floating point—Keyword used is float
- double precision floating point—Keyword used is double
- valueless—Keyword used is void


Basic Data Types



Sizes and ranges of basic  data types in C for a 16-bit computer




Sizes and ranges of basic  data types in C for a 32-bit computer



Comments