Types and Variables of C Programming


Data Types

Data types needed to declare variables. Think about human, Human can be male or female or other gender. Male can’t take everything like female … right? ­čÖé ┬áData types is something like that. Each type can store a specific size of data.

Fundamental Data Type

  1. Integer Data Type, That.
  2. Floating Data Type.
  3. Character Data Type.

Derived Data Type

  1. Array.
  2. Pointer.
  3. Structure.
  4. Enumeration.

I will give an example only for Fundamental Data type and Derived on later post since it seems a bit advanced right now.


Variable just a name of an area where data will be saved. Whenever we need to use the data , we just need to call the specified name. The variable can contain letter,digits and underscore. And it must begin with letter or underscore. So we can declare a variable like this:


Data Type & Variable Example

Compile the code: