long int in c - C Program to Demonstrate the Working of Keyword long



 c program to demonstrate the working of keyword long

Learn C - C tutorial - c program to demonstrate the working of keyword long - C examples - C programs

C Program to Demonstrate the Working of Keyword long

  • The long is said to be an one of the modifier, indicates as long.
  • That may increase the size of a variable during declaration.

Sample Code

#include <stdio.h>
int main()
{
    int a;
    long b;
    long long c;
    double e;
    long double f;
    printf("Size(int) = %ld bytes\n",sizeof(a));
    printf("Size(long) = %ld bytes\n",sizeof(b));
    printf("Size(long long) = %ld bytes\n",sizeof(c));
    printf("Size(double) = %ld bytes\n",sizeof(e));
    return 0;
}

Output

Size(int) = 4 bytes
Size(long) = 8 bytes
Size(long long) = 8 bytes
Size(double) = 8 bytes


View More Quick Examples


Related Searches to long int in c - C Program to Demonstrate the Working of Keyword long