Data Types In C Programming Language

C provides a rich set of data types. Data types are used to define a variable before it is used. A  C programmer has to tell the compiler which data type he is going to use in the program.
A programmer must use appropriate data type as for his requirement.

C supports 3 category of data types;
  1. Primary or Fundemental Data Types
  2. User Defined Data Types
  3. Derived Data Types
 1. Primary or Fundemental Data Types :
They are integer data type, floating point data type, character data type.

Integer data types represents whole numbers.
Floating point data types represents real numbers(Float supports 6 digit, Double supports 14 digit precision).
Character represents a single character.
Void is used as return type of a function, which doesn't return any value.

2. User Defined Data Types :
C allows users to define their own data types.
User defined data types are created from promary data types.
tyoedef is the identifier, which is used to create such data types.
General syntax : typedef type identifier;
For example : typedef int score;
Score speed, accuracy;

3. Derived Data Types :
These are derived from standard data types by adding additional features to it.
Some examples:
Arrays and strings, stuructures, unions