Data Types In C

Data Types In C

What is Data Type In C?

Data Types In C


Data type tells the compiler how the data inside the variable is to be interpreted.


Before that we would like to tell you about If you are searching for onboarding software, you can use this website. Provitrac provides cloud-based applicant tracking system and recruitment software.


C language has three types of data types:

  1. Basic Data Type
  2. Derived Data Type
  3. User Defined Data Type

Basic Types are:


int - Integers are whole number which can be positive or negative or zero. For example, -1, 0, 1.

char - It is used to declare character type variables.

float and double - It is used to denote real or floating point numbers.

unsigned int - If you want to use only positive numbers then you use this keyword in front of variable or constant.


TypeSize (bytes)Format Specifier
intat least 2, usually 4%d, %i
char1%c
float4%f
double8%lf
short int2 usually%hd
unsigned intat least 2, usually 4%u
long intat least 4, usually 8%ld, %li
long long intat least 8%lld, %lli
unsigned long intat least 4%lu
unsigned long long intat least 8%llu
signed char1%c
unsigned char1%c
long doubleat least 10, usually 12 or 16%Lf


Derived Data Types are derived from basic data types.


  • Function
  • Array
  • Pointers
  • References


User defined data types are derived from an existing data types.


  • Class
  • Structure
  • Union
  • Enumeration

We will study this topics in our coming posts. Keep visiting, thanks for sharing.

Load comments