int keyword in C (original) (raw)

Last Updated : 11 Jun, 2026

The int keyword in C is used to declare integer variables that store whole numbers without decimal values. It is one of the most commonly used data types in C programming.

#include <stdio.h>

int main(){ int age = 25;

printf("Age = %d", age);

return 0;

}

`

**Explanation:

In the above example:

Syntax

int variable_name;

Multiple int Variables

We can declare multiple integer variables in a single statement.

C `

#include <stdio.h>

int main(){

int a = 10, b = 20, c = 30;

printf("%d %d %d", a, b, c);

return 0;

}

`

Size of int

The sizeof() operator can be used to determine the memory occupied by an integer variable.

C `

#include <stdio.h>

int main(){

printf("Size of int = %zu bytes", sizeof(int));

return 0;

}

`

Output

Size of int = 4 bytes

**Note: The size of int may vary depending on the compiler and system architecture, although it is typically 4 bytes on modern systems.

Range of int

A signed integer generally stores values in the following range:

Type Typical Size Range
int 4 Bytes -2,147,483,648 to 2,147,483,647

Advantages of Using int