C Data Types
C data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before to use in a program. Each data type requires different amounts of memory and has some specific operations which can be performed over it.
Different data types also have different ranges upto which they can store numbers. These ranges may vary from compiler to compiler.
C language supports two different type of data types:
- Primary data types
- Derived data types
Primary data types
These are fundamental data types in C namely integer(int), floating point(float), character(char) and void.
Data type determines the type of data a variable will hold. If a variable x is declared as int. it means x can hold only integer values.
Every variable which is used in the program must be declared as what data-type it is.
Derived data types
Derived data types are nothing but primary datatypes but a little twisted or grouped together like array, stucture, union and pointer. These data types are are discussed at later tutorial in details.