The int keyword is used to declare integer type variables. For example:
int count;
Here, count is an integer variable.
short, long, signed and unsigned
The short, long, signed and unsigned keywords are type modifiers that alter the meaning of a base data type to yield a new type.
short int smallInteger; long int bigInteger; signed int normalInteger; unsigned int positiveInteger;
Data types | Range |
---|---|
short int | -32768 to 32767 |
long int | -2147483648 to 214743648 |
signed int | -32768 to 32767 |
unsigned int | 0 to 65535 |
return
The return keyword terminates the function and returns the value.
int func() { int b = 5; return b; }