Create and use Signed Integer Types - C Data Type

C examples for Data Type:int

Introduction

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 char1
short 2
int4
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.

Demo Code

#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;
}

Result


Related Tutorials