1

I am using gcc version 5.4.0 20160609, 64 bit. When I tried to find the size of long int and long long int using sizeof operator it shows the size as 8 for both long int and long long int. Then What is the use of this long long type qualifier? When does the use of this qualifier come into picture?

The piece of code I used to find the size is given below:

#include <stdio.h>

int main(void)
{
    printf("size of long int: %lu\n", sizeof(long int));
    printf("size of long long int: %lu\n", sizeof(long long int));

    return 0;
}

out put is:

size of long int: 8
size of long long int: 8
John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Vinie
  • 53
  • 1
  • 7

0 Answers0