C examples for Data Type:int
We have five basic types of variables that can store signed integer values, so positive and negative values can be stored.
Type Names for Integer Variable Types
Type name | Number of bytes |
---|---|
signed char | 1 |
short | 2 |
int | 4 |
long | 4 |
long long | 8 |
The type names short, long, and long long can be written as short int, long int, and long long int.
They can optionally have the keyword signed in front.
#include <stdio.h> int main(void) { short size;//www. ja v a2s .c om int number; long long count; count = 100000; size = 100; number = 23456; printf("%d",size); return 0; }