C - Signed Integer Types

Introduction

We have five basic types of variables that can store signed integer values.

So you can store positive and negative values.

The Type Names for Integer Variable Types

Type name Number of bytes
signed char1
short 2
int4
long 4
long long 8

Here are some declarations for variables of these types:

short myValue;
int house_number;
long long star_count;

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.

Type int can be written as signed int.

You can find out what the limits are in the limits.h header file.