Data type in C
Written by
In C programming, data types refer to the type and size of variables and functions. Data type is a classification of different types of data based on the characteristics of the data. For example, the number 5 can be a weight in kilograms, a distance in kilometers, a length in centimeters, or a monetary value in dollars.e type and size used for declaring variables and function of different types.
In C, there are two categories of data types: primary and derived.
-
Primary data type • Integer • Float • Character
-
Derived data types • Array • Structure • Union • Pointer
Overall, understanding data types is essential for writing efficient and effective C code.