Integers is the set of numbers that include all the whole numbers and their negative values.
The set of integers can be represented as
-∞ .... -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5.....∞
In programming, integer is a data type used to represent integer values. We can declare a variable as an integer type or define the result of a function or expression as of integer type.
A variable declared as an integer type occupies a specified amount of memory space in computer. The amount of space occupied depends on the computer system you are using - typicall ranging from 4 bytes to over 64 bytes.
A variable defined as an integer type cannot store any other types of data such as character like a,b,c or floating-point numbers like 5.43, -0.43.
In C++, an integer variable is declared as
int a = 5;
var a = 5;