Datatypes specify the "size", "type of data" and the "maximum range" of value that an object can accommodate.

Object - An object is a named region of storage. It might be a variable or array or structure instance.

Classification of datatypes

Data types are classified into two types:

  • Basic datatypes
  • Derived datatypes

Basic data types can represent values such as characters, Integer and decimal-point types.

  • Characters can be represented by using char datatype (Ex: a, b, c, d, f etc)
  • Integer values through int datatype. ( Ex: 100, 234, 456 etc)
  • Decimal point values through the float and double datatypes (3.5, 7.5456, 878.00232 etc.)
char also belongs to integer family. Because characters are represented using their ASCII values (Integer values).

Derived data types are constructed from the basic datatypes.

  • Arrays - Sequence of objects of the same type under a single name.
  • Functions -  Returns an object of the specified type.
  • Pointers - Points to an object of a given address.
  • Structures -   Objects of different types under a single name.
  • Unions - Contain any one of the objects of different types at the same time.

I just gave a brief introduction to all the datatypes. We will see more in detail about data types in our further articles.

More on datatypes:

Int datatype in c
Variables declared with int data type can accommodate 32-Bit integer value i.e. 4BYTES. The size varies from compiler to compiler i.e. in 32-bit TCC & BCC...
Float and double datatype in C
Variables declared with float datatype can able to store 32-bit decimal point value [e.g. 33.34], the representation of decimal-point in...