Thursday, July 3, 2014

C Program to Demonstrate the Working of Keyword long

Source Code


#include <stdio.h>
int main(){
    int a;
    long int b;                /* int is optional. */
    long long int c;            /* int is optional. */
    printf("Size of int = %d bytes\n",sizeof(a));
    printf("Size of long int = %ld bytes\n",sizeof(b));
    printf("Size of long long int = %ld bytes",sizeof(c));
    return 0;
}
Output
Size of int = 4 bytes
Size of long int = 4 bytes
Size of long long int = 8 bytes

Share this

0 Comment to "C Program to Demonstrate the Working of Keyword long"