Integer Data Type in C Programming

Integer Data Type - int

An integer is a whole number (a number without a fractional part). It can be positive or negative numbers like 1, -2, 3, etc., or zero.

The sizes of the integer variables depend on the hardware and operating system of the computer. On a typical 16-bit system, the sizes of the integer types are as follows.

type
Bytes
Possible Values le Values

int


2 or 4


-32,767 to 32,767


unsigned int


2 or 4


0 to 65,535


signed int


2 or 4


-32,767 to 32,767


short int


2


-32,767 to 32,767


unsigned short int

2


0 to 65,535


signed short int


2


-32,767 to 32,767

long int


4


-2,147,483,647 to 2,147,483,647

signed long int


4


-2,147,483,647 to 2,147,483,647

unsigned long int


4


0 to 4,294,967,295


Example:

Other fundamental data types are

Ready to get started?

Ready to embark on your journey into the world of C programming? Our comprehensive course provides the perfect starting point for learners of all levels. With engaging lessons, hands-on exercises, and expert guidance, you'll gain the skills and confidence needed to excel in this fundamental programming language. Let's dive in and unlock the endless possibilities of C programming together!