C Data Types: int, float, char and more
In C programming, variables or memory locations should be declared before it can be
used. Similarly, a function also needs to be declared before use.
Data types simply refers to the type and size of data associated with variables and
Data types in C
1. Fundamental Data Types
2. Derived Data Types
This tutorial will focus on fundamental data types. To learn about derived data types, visit
the corresponding tutorial.
int - Integer data types
Integers are whole numbers that can have both positive and negative values but no
decimal values. Example: 0, -5, 10
In C programming, keyword int is used for declaring integer variable. For example:
Here, id is a variable of type integer.
You can declare multiple variable at once in C programming. For example:
int id, age;
The size of int is either 2 bytes(In older PC's) or 4 bytes. If you consider an integer having
of 4 byte(
-1, 0, 1,